another aoc solution
This commit is contained in:
13
examples/puzzles/euler_09.zr
Normal file
13
examples/puzzles/euler_09.zr
Normal file
@@ -0,0 +1,13 @@
|
||||
func main[] : I64
|
||||
let out: I64 = 0
|
||||
|
||||
for a in 500..1000
|
||||
for b in 500..1000
|
||||
if a * b > out
|
||||
let s: String = str.from_i64(a * b)
|
||||
let s_rev: String = str.reverse(s)
|
||||
if str.equal(s, s_rev)
|
||||
out = a * b
|
||||
mem.free(s)
|
||||
mem.free(s_rev)
|
||||
io.println_i64(out)
|
||||
Reference in New Issue
Block a user