-
Notifications
You must be signed in to change notification settings - Fork 1
/
Euler_Problem-016.b93
41 lines (23 loc) · 1.05 KB
/
Euler_Problem-016.b93
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
v00000000000000000000000000000000000000000000000000000000000
v00000000000000000000000000000000000000000000000000000000000
v00000000000000000000000000000000000000000000000000000000000
v00000000000000000000000000000000000000000000000000000000000
v00000000000000000000000000000000000000000000000000000000000
v00000000000000000000000000000000000000000000000000000000001
> "0":::::00p01p02p03p04p05p v // INIT
v p64*8"}"p60*p62:6p61:"<" <v p66-1g66 <
>06g1-66p 0> 66g16g%66g16g/g"0"-+ 66g|
v $# < .
>46g:!#^_ 1-46p 06g1-66p 076p > 66g!#^_ v @
v61g66+"0"%+55:+g67*2-"0"g/g61 g66%g61g66<
>g%66g16g/p55+/76p 66g1-66p ^
[0,6] MAX DIGIT COUNT ()
[1,6] WIDTH
[2,6] HEIGHT
[4,6] Count (1000), --
[6,6] Curr Idx
[7,6] Carry
"}"8* => 1000
66g16g%66g16g/ => get [x,y]
---------------------------------------
Here I implemented a long multiplication algorithm. Then I took the value `1` and doubled it 1000 times. The calculation of the digit sum was then easy.