lean4-htt/tests/bench/nat_repr.lean
2024-04-17 18:10:32 +00:00

8 lines
203 B
Text

def main : List String → IO Unit
| [n] => do
let mut s := 0
for i in [0:n.toNat!] do
for j in [:i] do
s := s + j.repr.length
IO.println s
| _ => throw $ IO.userError "give upper bound"