結果
| 問題 | No.1168 Digit Sum Sequence |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-14 23:29:28 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 95 ms / 2,000 ms |
| コード長 | 209 bytes |
| 記録 | |
| コンパイル時間 | 417 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 15,484 KB |
| 最終ジャッジ日時 | 2026-03-25 07:58:50 |
| 合計ジャッジ時間 | 4,595 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 29 |
ソースコード
n = int(input())
res = 0
while True:
if res == 0:
res = sum([int(x) for x in str(n)])
else:
res = sum([int(x) for x in str(res)])
if res < 10:
break
print(res)