#Lutece1971. 自幂数
自幂数
Migrated from Lutece 1971 自幂数
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
相信大家都做过一道题:求水仙花数
水仙花数的定义为:如果是位数,的各位的次方的也为,那么为水仙花数
显然,水仙花数一共有个:
我们现在定义位自幂数为:
如果是位数,的各位的次方的也为,那么为位自幂数
求位自幂数有哪些,排序后输出
请注意,这里定义的自幂数必须大于
Input
一个数
Output
一行数,空格隔开,代表位自幂数。
如果不存在,请输出
Samples
3
153 370 371 407
Note
我找到了所有的自幂数,你呢?
建议此题使用搜索,打表过题会被扣分
Resources
2018 UESTC ACM Training for Search Algorithm and String