結果

問題 No.1168 Digit Sum Sequence
ユーザー daikisuyamadaikisuyama
提出日時 2020-08-14 21:23:21
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 147 bytes
コンパイル時間 658 ms
コンパイル使用メモリ 87,004 KB
実行使用メモリ 71,548 KB
最終ジャッジ日時 2023-07-31 19:29:57
合計ジャッジ時間 4,707 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
71,424 KB
testcase_01 AC 79 ms
71,188 KB
testcase_02 AC 79 ms
71,016 KB
testcase_03 AC 76 ms
71,368 KB
testcase_04 AC 78 ms
71,512 KB
testcase_05 AC 79 ms
71,276 KB
testcase_06 AC 78 ms
71,268 KB
testcase_07 AC 80 ms
71,188 KB
testcase_08 AC 79 ms
71,032 KB
testcase_09 AC 78 ms
71,532 KB
testcase_10 AC 77 ms
71,136 KB
testcase_11 AC 79 ms
71,184 KB
testcase_12 AC 79 ms
71,008 KB
testcase_13 AC 77 ms
71,328 KB
testcase_14 AC 76 ms
71,276 KB
testcase_15 AC 77 ms
71,268 KB
testcase_16 AC 77 ms
71,016 KB
testcase_17 AC 79 ms
71,420 KB
testcase_18 AC 78 ms
71,212 KB
testcase_19 AC 77 ms
71,392 KB
testcase_20 AC 77 ms
71,548 KB
testcase_21 AC 77 ms
71,336 KB
testcase_22 AC 78 ms
71,296 KB
testcase_23 AC 77 ms
71,264 KB
testcase_24 AC 75 ms
71,172 KB
testcase_25 AC 78 ms
71,016 KB
testcase_26 AC 78 ms
71,332 KB
testcase_27 AC 77 ms
71,412 KB
testcase_28 AC 77 ms
71,412 KB
testcase_29 AC 77 ms
71,180 KB
testcase_30 AC 77 ms
71,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def calc(n):
    ret=0
    while n!=0:
        ret+=(n%10)
        n//=10
    return ret
N=int(input())
for i in range(100):
    N=calc(N)
print(N)
0