結果
問題 |
No.432 占い(Easy)
|
ユーザー |
|
提出日時 | 2022-05-17 11:57:50 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 301 bytes |
コンパイル時間 | 568 ms |
コンパイル使用メモリ | 82,016 KB |
実行使用メモリ | 65,664 KB |
最終ジャッジ日時 | 2024-09-15 06:08:30 |
合計ジャッジ時間 | 2,656 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 13 WA * 9 |
ソースコード
T = int(input()) def calc(S): l = list(map(int,list(S))) while len(l) > 1: nx = [0] * (len(l) - 1) for i in range(len(l) - 1): nx[i] = (l[i] + l[i+1]) % 9 l = nx if l[0] == 0: l[0] = 9 return l[0] for _ in range(T): print(calc(input()))