Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Information Science and Engineering
完数
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KB
Total submit users: 152, Accepted users: 106
Problem 10094 : No special judgement
Problem description
  一个数如果恰好等于它的因子之和,这个数就称为“完数”。例如:6=1+2+3。编写找出N以内的所有完数之和。

Input
  每行输入一个正整数N (0 < N ≤ 10000)。最后是0不需要处理。

Output
  输出N内的所有完数的和。

Sample Input
6
28
0
Sample Output
6
34
Problem Source
  Teacher yxl 

Submit   Discuss   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:2319 today,16259046 total, since 2010-05-07