結果
| 問題 | No.539 インクリメント |
| コンテスト | |
| ユーザー |
mkawa2
|
| 提出日時 | 2020-01-04 12:06:23 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 532 bytes |
| 記録 | |
| コンパイル時間 | 69 ms |
| コンパイル使用メモリ | 82,324 KB |
| 実行使用メモリ | 78,656 KB |
| 最終ジャッジ日時 | 2026-09-28 08:03:44 |
| 合計ジャッジ時間 | 1,423 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 RE * 2 |
ソースコード
def main():
def plus1(s):
n=len(s)
num=str(int(s)+1).zfill(n)
return num
t=int(input())
for _ in range(t):
s=input()
n=len(s)
for i,c in enumerate(s[::-1]):
if c.isdigit():
r=n-i
break
else:
print(s)
continue
for j,c in enumerate(s[r-1::-1]):
if not c.isdigit():
l=n-i-j
break
else:l=0
print(s[:l]+plus1(s[l:r])+s[r:])
main()
mkawa2