#P3708. Koishi's Modular Summation
Koishi's Modular Summation
Koishi's Modular Summation
Under the guidance of Flandre, Koishi has become a master in mathematics and has devised a simple problem. Given an integer n, define the function \(f(x)=\sum_{i=1}^{n} (x \bmod i)\). Your task is to compute and output \(f(1), f(2), \ldots, f(n)\).
Koishi pretends that she cannot solve this problem herself, so she is asking for your help. Can you solve it?
inputFormat
The input consists of a single integer n. For each x from 1 to n, you need to calculate \(f(x)=\sum_{i=1}^{n} (x \bmod i)\).
outputFormat
Output \(f(1), f(2), \ldots, f(n)\) in one line, separated by single spaces.
sample
1
0