print_int(i64 a); print_nl(); sum_inner(i64 s, i64 n, (i64) res) { if n <= 0 { res(s); } else { sum_inner(s + n, n - 1, res); } } sum(i64 n, (i64) res) { sum_inner(0, n, res); } main() { sum(1000000000) => i64 s; print_int(s); print_nl(); }