結果
| 問題 |
No.539 インクリメント
|
| コンテスト | |
| ユーザー |
kokoa1046
|
| 提出日時 | 2017-10-11 15:28:32 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 591 bytes |
| コンパイル時間 | 333 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 12,928 KB |
| 最終ジャッジ日時 | 2024-11-17 09:40:41 |
| 合計ジャッジ時間 | 1,295 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 1 |
| other | AC * 1 RE * 2 |
ソースコード
n= int(input())
li=[input() for _ in range(n)]
for i in li:
flag=False
j=len(i)-1
while True:
if j<0:
print(i)
break
if not i[j].isdigit():
j-=1
continue
else:
k=j
while k<len(i) and i[k].isdigit():
k-=1
numlen=len(i[k+1:j+1])
num=int(i[k+1:j+1])+1
numincedstr=str(num).zfill(numlen)
i=i[:k+1]+numincedstr+i[j+1:]
j-=len(numincedstr)
print(i)
break
kokoa1046