結果

問題 No.539 インクリメント
ユーザー kokoa1046kokoa1046
提出日時 2017-10-03 14:10:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 494 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 20,256 KB
最終ジャッジ日時 2024-04-27 22:39:34
合計ジャッジ時間 3,720 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 TLE -
testcase_02 -- -
testcase_03 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n= int(input())
li=[input() for _ in range(n)]
for i in li:
    flag=False
    j=0
    while True:
        if j>=len(i):
            print(i)
            break
        if not i[j].isdigit():
            j+=1
            continue
        else:
            k=j
            while k<len(i) and i[k].isdigit():
                k+=1
            num=int(i[j:k])+1
            numincedstr=str(num)
            i=i[:j]+numincedstr+i[k:]
            j+=len(numincedstr)
            
            
        
0