結果
| 問題 | No.539 インクリメント |
| コンテスト | |
| ユーザー |
AEn
|
| 提出日時 | 2022-06-14 17:54:18 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 667 bytes |
| 記録 | |
| コンパイル時間 | 68 ms |
| コンパイル使用メモリ | 81,024 KB |
| 実行使用メモリ | 148,812 KB |
| 最終ジャッジ日時 | 2026-09-09 01:28:22 |
| 合計ジャッジ時間 | 2,716 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | MLE * 3 |
ソースコード
n = int(input())
num = set([str(i) for i in range(10)])
for i in range(n):
S = input()
ans = []
f = False
s = False
for j in reversed(range(len(S))):
if f == False and S[j] in num:
a, b = (int(S[j])+1)//10, (int(S[j])+1)%10
ans.append(str(b))
s = True
f = True
elif s == True and S[j] in num:
a, b = (int(S[j])+a)//10, (int(S[j])+a)%10
ans.append(str(b))
elif s == True:
if a == 1:
ans.append('1')
s = False
ans.append(S[j])
else:
ans.append(S[j])
print(''.join(ans)[::-1])
AEn