結果
問題 |
No.432 占い(Easy)
|
ユーザー |
|
提出日時 | 2019-02-01 13:51:44 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 417 ms / 2,000 ms |
コード長 | 422 bytes |
コンパイル時間 | 241 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-22 03:44:27 |
合計ジャッジ時間 | 3,789 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 22 |
ソースコード
def add(a, b): if int(a + b) >= 10: return (int(a) + int(b)) // 10 + (int(a) + int(b)) % 10 else: return int(a) + int(b) t = int(input()) for x in range(t): s = list(input()) if len(s) == 1: print(s[0]) else: while len(s) > 1: ls = [] for i in range(len(s)-1): ls.append(add(s[i], s[i+1])) s = ls print(ls[0])