結果

問題 No.9001 標準入出力の練習問題(テスト用)
ユーザー korogy
提出日時 2017-09-02 04:05:20
言語 Ruby
(4.0.6 + ACL)
コンパイル:
ruby -w -c _filename_
実行:
ruby _filename_
結果
AC  
実行時間 52 ms / 1,000 ms
+ 752µs
コード長 460 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 352 ms
コンパイル使用メモリ 9,828 KB
実行使用メモリ 14,464 KB
最終ジャッジ日時 2026-09-19 19:20:06
合計ジャッジ時間 1,878 ms
ジャッジサーバーID
(参考情報)
judge5_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #
raw source code

class StandardIO
    attr_reader :a, :b, :s

    def initialize(a: 0, b: 0, s: "")
        @a, @b, @s = a, b, s
    end

    def datainput
        begin
            @a, @b = gets.chomp.split.map { |v| Integer(v) }
            @s = gets.chomp
        rescue
            
        end
    end

    def dataoutput
        puts [@a+@b, @s].join(" ")
    end

    def run
        datainput
        dataoutput
    end
end

if $0 == __FILE__
    StandardIO.new.run
end
0