advent of code day 1
This commit is contained in:
11
examples/puzzles/euler6.zr
Normal file
11
examples/puzzles/euler6.zr
Normal file
@@ -0,0 +1,11 @@
|
||||
func main[] : I64
|
||||
let sum_of_squares: I64 = 0
|
||||
for i in 1..101
|
||||
sum_of_squares = sum_of_squares + i * i
|
||||
|
||||
let square_of_sum: I64 = 0
|
||||
for i in 1..101
|
||||
square_of_sum = square_of_sum + i
|
||||
square_of_sum = square_of_sum * square_of_sum
|
||||
|
||||
io.println_i64(square_of_sum - sum_of_squares)
|
||||
Reference in New Issue
Block a user