結果

問題 No.539 インクリメント
ユーザー char134217728char134217728
提出日時 2017-08-19 23:08:41
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 159 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 25,844 KB
最終ジャッジ日時 2024-04-22 16:44:32
合計ジャッジ時間 2,573 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
12,032 KB
testcase_01 AC 317 ms
17,792 KB
testcase_02 AC 368 ms
18,048 KB
testcase_03 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=gets.to_i
n.times do
  s = gets.chomp
  s =~ /([1-9]*|0)([^\d]*?)\z/
  if $1.length > 0
    puts ($` << ($1.to_i + 1).to_s << $2)
  else
    puts s
  end
end
0