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: 200ms, Special Time Limit:500ms, Memory Limit:32768KB
Total submit users: 161, Accepted users: 144
Problem 10431 : No special judgement
Problem description
  水仙花数是一个三位数,其各位数字立方和等于数本身。例如,153是一个水仙花数,因为153=13+53+33。你的任务是判断一个数n是否是水仙花数。

Input
  输入文件有若干行,每一行上有一个整数n,(1<=n<=999)。

Output
  输出文件有若干行。对输入文件中的每个整数n,在一行上输出“YES”或“NO”,如果数n是水仙花数,那么输出“YES”,否则输出“NO”。

Sample Input
153
100
Sample Output
YES
NO
Problem Source
  qshj

Submit   Discuss   Judge Status  Problems  Ranklist 

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