結果

問題 No.539 インクリメント
ユーザー h_nosonh_noson
提出日時 2017-07-11 02:10:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 250 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,264 KB
最終ジャッジ日時 2024-04-16 16:30:41
合計ジャッジ時間 1,444 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,752 KB
testcase_01 AC 37 ms
11,264 KB
testcase_02 RE -
testcase_03 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import re

n = int(input())
for i in range(n):
    s = input()
    m = re.search(r'(.*[^0-9]+|)([0-9]+)([^0-9]*)',s)
    if m is None:
        print(s)
    else:
        print(m.group(1) + str(int(m.group(2)) + 1).zfill(len(m.group(2))) + m.group(3))
0