a040. 阿姆斯壯數
Tags : 數學 窮舉
Accepted rate : 12458人/13170人 ( 95% ) [非即時]
評分方式:
Tolerant

最近更新 : 2021-04-16 09:25

Content

所謂 Armstrong number 指的是一個 n 位數的整數,它的所有位數的 n 次方和恰好等於自己。

如;1634 = $1^4 + 6^4 + 3^4+ 4^4$

請依題目需求在一定範圍內找出該範圍內的所有 armstrong numbers.

Input

輸入共一行包含兩個數字n, m(n<m, n>0, m<=1000000),代表所有尋找 armstrong number 的範圍

Output

將所有範圍內的 armstrong number 依序由小到大輸出,如果沒有找到請輸出 none.

 

Sample Input #1
100 999
Sample Output #1
153 370 371 407
Sample Input #2
10 99
Sample Output #2
none
測資資訊:
記憶體限制: 512 MB
公開 測資點#0 (14%): 1.0s , <1K
公開 測資點#1 (14%): 1.0s , <1K
公開 測資點#2 (14%): 1.0s , <1K
公開 測資點#3 (14%): 1.0s , <1K
公開 測資點#4 (14%): 1.0s , <1K
公開 測資點#5 (15%): 1.0s , <1K
公開 測資點#6 (15%): 1.0s , <1K
Hint :
Tags:
數學 窮舉
出處:
[管理者: jiangsir(jiangsir) ]


ID User Problem Subject Hit Post Date
34458 11130017@wfs...(10124楊智元) a040
劉康仁被狗幹
5736 2023-03-21 15:31
34457 11130017@wfs...(10124楊智元) a040
我是你爸兒子乖
54 2023-03-21 15:24
34214 ck1090932@gl...(ck1090932陳邦仁) a040
69 2023-03-06 09:34
34077 dreamer.aeu6...(Noah) a040
117 2023-02-27 20:26
33817 imlindora@gm...(林祺淏Augus Lin) a040
152 2023-02-05 20:11