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: 413, Accepted users: 390
Problem 10463 : No special judgement
Problem description
  给定一个十进制正整数n,判断其是否为完数。所谓完数是指不包括其本身的所有因数之和恰好等于其本身的数。例如:6是一个完数,因为6的因数有1, 2, 3, 6,不包含6本身的因数和为1+2+3恰好为6。请写一个函数来判断一个数是否为完数。

Input
  输入数据有若干行。每行上有一个正整数,对应一种情形。

Output
  对于每一种情形,先输出“Case #:”(#为序号,从1起),然后输出n,逗号,结果(YesNo),换行。

Sample Input
6
9
15
Sample Output
Case 1: 6,Yes
Case 2: 9,No
Case 3: 15,No 
Submit   Clarifications   Judge Status  Problems  Ranklist 

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