結果

問題 No.9001 標準入出力の練習問題(テスト用)
ユーザー korogykorogy
提出日時 2017-09-02 04:05:20
言語 Ruby
(3.3.0)
結果
AC  
実行時間 80 ms / 1,000 ms
コード長 460 bytes
コンパイル時間 411 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,160 KB
最終ジャッジ日時 2024-04-24 10:28:34
合計ジャッジ時間 1,197 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
12,160 KB
testcase_01 AC 80 ms
12,160 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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