[Odin] Loop, increment, subtract[Odin] Loop, increment, subtract

🎳

A Billion Bowling Pins

Week 5, 2026

package main import "core:fmt" main :: proc () { for i in ([?] int { 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 1e3, 1e4, 1e5, 1e6, 1e9, 1e12, 1e15, 1e18, }) { rows := full_rows_count(i) fmt.printfln("%i\t%i", i, rows) } } full_rows_count :: proc (pins: int) -> int { i := 0 p := pins for p >= 0 { i += 1 p -= i } return i - 1 }