易码技术论坛

 找回密码
 加入易码
搜索
查看: 113693|回复: 0

[ACM]Daffodil number(弱智题或新手题)

[复制链接]
发表于 2006-5-9 22:32:30 | 显示全部楼层 |阅读模式
是那天比赛的第一道……

Time limit: 1 Seconds   Memory limit: 32768K

-------------

The daffodil number is one of the famous interesting numbers in the mathematical world. A daffodil number is a three-digit number whose value is equal to the sum of cubes of each digit.

For example. 153 is a daffodil as 153 = 1<SUP>3</SUP> + 5<SUP>3</SUP> + 3<SUP>3</SUP>.

Input

There are several test cases in the input, each case contains a three-digit number.

Output

One line for each case. if the given number is a daffodil number, then output "Yes", otherwise "No".

Sample Input

153
610


Sample Output

Yes
No



Author: LIU, Yaoting



您需要登录后才可以回帖 登录 | 加入易码

本版积分规则

Archiver|手机版|小黑屋|EMAX Studio

GMT+8, 2024-5-14 03:52 , Processed in 0.009049 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表