結果
問題 |
No.432 占い(Easy)
|
ユーザー |
|
提出日時 | 2018-07-09 21:53:13 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 372 bytes |
コンパイル時間 | 144 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 15,616 KB |
最終ジャッジ日時 | 2024-07-16 04:24:22 |
合計ジャッジ時間 | 2,449 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 RE * 2 |
ソースコード
import math def add(x, y): z = x + y if z >= 10: return z % 10 + z // 10 else: return z def shrink(x): if len(x) == 1: return x[0] else: r = [add(x[i], x[i+1]) for i in range(len(x)-1)] return shrink(r) T = int(input()) S = [[int (j) for j in list(input())] for i in range(T)] for s in S: print(shrink(s))