提示: 欢迎访问OurACM平台。
Problem 1756 FactorSum

Accept: 458    Submit: 1200
Time Limit: 1000 mSec    Memory Limit : 32768 KB

Problem Description

Give you a signed integer n (n<=10000), please tell me the sum of its all non-negative factors, and all its factors must larger than zero. Say, give you 12, you know, 1,2,3,4,6 are its factors. So the answer would be 1+2+3+4+6=16. if n < 0 , just output "0"

There are several test cases, for evey case, there is exactly one line containing an integer N (N<=10000).

Sample Input

1 2 3 4

Sample Output

0 1 1 3

Source

FZU 2009 Summer Training IV--Number Theory

Submit  Back  Status  Discuss