remove aoc solutions
This commit is contained in:
18
examples/euler/euler_16.zr
Normal file
18
examples/euler/euler_16.zr
Normal file
@@ -0,0 +1,18 @@
|
||||
func main[] : i64
|
||||
n := [1]
|
||||
|
||||
for j in 0..1000
|
||||
carry := 0
|
||||
for i in 0..n->size
|
||||
tmp : i64 = n->nth(i) * 2 + carry
|
||||
n->set(i, tmp % 10)
|
||||
carry = tmp / 10
|
||||
while carry > 0
|
||||
n->push(carry % 10)
|
||||
carry = carry / 10
|
||||
|
||||
sum := 0
|
||||
for i in 0..n->size
|
||||
sum += n->nth(i)
|
||||
|
||||
io.println_i64(sum)
|
||||
Reference in New Issue
Block a user