結果
| 問題 |
No.432 占い(Easy)
|
| コンテスト | |
| ユーザー |
toshiro_yanagi
|
| 提出日時 | 2020-08-19 07:36:08 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 378 ms / 2,000 ms |
| コード長 | 341 bytes |
| コンパイル時間 | 84 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-10-12 03:33:44 |
| 合計ジャッジ時間 | 3,325 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 22 |
ソースコード
def calc(s):
while len(s) > 1:
lst = []
for i in range(len(s) - 1):
n = int(s[i]) + int(s[i + 1])
if n >= 10:
n = 1 + n % 10
lst.append(str(n))
s = "".join(lst)
return s
t = int(input())
for i in range(t):
s = input()
ans = calc(s)
print(ans)
toshiro_yanagi