#K10811. Magic Spell Power
Magic Spell Power
Magic Spell Power
You are given an integer \(N\) representing both the number of students and the number of professors at the Magic School. Each professor has a unique capability represented by an integer from 1 to \(N\). The professor with capability \(i\) casts a spell on every student whose index is a multiple of \(i\), adding \(i\) to that student's total spell power. In other words, the total spell power on the \(k\)-th student is given by:
\(f(k)=\sum_{d|k} d\)
Your task is to compute and output the spell power for every student from 1 to \(N\) for multiple test cases.
Example:
For \(N = 6\), the output is: 1 3 4 7 6 12
inputFormat
The first line of input contains a single integer \(T\) representing the number of test cases. Each of the following \(T\) lines contains one integer \(N\), denoting the number of students (and professors) for that test case.
Constraints: \(1 \leq N \leq 10^6\).
outputFormat
For each test case, output a single line containing \(N\) space‐separated integers. The \(i\)-th integer is the total spell power on the \(i\)-th student.
## sample1
1
1