結果
| 問題 | No.539 インクリメント | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-06-30 22:51:53 | 
| 言語 | Ruby (3.4.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 378 ms / 2,000 ms | 
| コード長 | 308 bytes | 
| コンパイル時間 | 76 ms | 
| コンパイル使用メモリ | 7,552 KB | 
| 実行使用メモリ | 28,432 KB | 
| 最終ジャッジ日時 | 2024-10-04 20:51:36 | 
| 合計ジャッジ時間 | 1,586 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 3 | 
コンパイルメッセージ
Syntax OK
ソースコード
def ascan; gets.split.map{|e|Rational(e)}; end
def scan; gets.to_i; end
gets
while cin=gets
    str = cin.chomp
    #puts str.succ
    if str=~/\d/
        str = "$"+str
        
        sc = str.scan(/^(.*\D+)(\d+)(\D*)$/)[0]
        puts sc[0][1..-1]+sc[1].succ+sc[2]
    else
        puts str
    end
end
            
            
            
        