-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEuler_Problem-017.b93
27 lines (22 loc) · 1.13 KB
/
Euler_Problem-017.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
v
033544355436688779886
0366555766
$
$ v-1 < v-1 <
>54*>:::1g"0"-\1p#^_54*>:::2g"0"-\2p|
v **25"d" 0 $$<
v <
v $< >:55+/2g\55+% v
: >:54*`| >"d"/1g70 v
>0\>:!#v_:"d"\`| ^0g1< >:"d"%!| v <
v < >:"}"8*-#^_$380v>:"d"/1g\ "d"%v
^ < <\3\7<
>+# \:# _+ \ 1- :|
@.+_ #! #:\ #+<
---------------------------------------
There are only N kinds of numbers:
- `0` - `20`: Get the length from a precomputed list
- `20` - `99`: Get the length of the first word from a precomputed list and the length of the second word (second digit) from the previous point
- `100` - `999`: Get the length of the first word from a precomputed list and the length of the second and third word (second digit) from the previous point
- `1000`: Get the hard coded value
*Note*: Interestingly this program operates completely on the stack - only the initializing method sets a few "constant fields" to per-definied values