結果

問題 No.1168 Digit Sum Sequence
ユーザー gorugo30gorugo30
提出日時 2021-01-20 11:48:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 183 bytes
コンパイル時間 622 ms
コンパイル使用メモリ 87,328 KB
実行使用メモリ 76,536 KB
最終ジャッジ日時 2023-08-24 14:18:09
合計ジャッジ時間 6,250 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
76,160 KB
testcase_01 AC 89 ms
76,132 KB
testcase_02 AC 90 ms
76,340 KB
testcase_03 AC 89 ms
76,284 KB
testcase_04 AC 89 ms
76,276 KB
testcase_05 AC 88 ms
76,436 KB
testcase_06 AC 88 ms
76,396 KB
testcase_07 AC 87 ms
76,536 KB
testcase_08 AC 90 ms
76,288 KB
testcase_09 AC 88 ms
76,300 KB
testcase_10 AC 88 ms
76,412 KB
testcase_11 AC 87 ms
76,276 KB
testcase_12 AC 88 ms
76,144 KB
testcase_13 AC 88 ms
76,280 KB
testcase_14 AC 88 ms
76,436 KB
testcase_15 AC 88 ms
76,076 KB
testcase_16 AC 88 ms
76,432 KB
testcase_17 AC 88 ms
76,324 KB
testcase_18 AC 90 ms
76,280 KB
testcase_19 AC 90 ms
76,292 KB
testcase_20 AC 88 ms
76,276 KB
testcase_21 AC 88 ms
76,284 KB
testcase_22 AC 88 ms
76,416 KB
testcase_23 AC 88 ms
76,396 KB
testcase_24 AC 89 ms
76,276 KB
testcase_25 AC 89 ms
76,416 KB
testcase_26 AC 89 ms
76,284 KB
testcase_27 AC 88 ms
76,284 KB
testcase_28 AC 90 ms
76,280 KB
testcase_29 AC 89 ms
76,140 KB
testcase_30 AC 89 ms
76,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
i = 1
def digitsum(n):
    ans = 0
    for i in range(100):
        ans += (n // (10 ** i)) % 10
    return ans
while i < 100:
    N = digitsum(N)
    i += 1
print(N)
0