Redirecting to
NADOS

Sum Of Factors

Given a number n, output the summation of all its proper Factors.

Note: A proper Factor of a natural number is the divisor that is strictly less than the number.
Input Format
The first line contains integer t stating number of test cases. 
For next t lines, each line contains an integer n.
Output Format
In each of t lines, print the summation of Factors of the Integer given.
Question Video
Constraints
1<= t <= 10^5
1<= n <= 10^5
Sample Input
3
2
10
20
Sample Output
1
8
22


  • Asked in Companies
  • Related Topics






Video Solution

Code Solution

Run
 
Run
Id Name