結果

問題 No.1168 Digit Sum Sequence
ユーザー brthyyjp
提出日時 2020-08-15 05:45:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 121 bytes
コンパイル時間 399 ms
コンパイル使用メモリ 82,392 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-10-10 17:11:26
合計ジャッジ時間 2,418 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

n = str(input())
res = 0
for i in range(len(n)):
    res += int(n[i])
if res%9 == 0:
    print(9)
else:
    print(res%9)
0