結果

問題 No.207 世界のなんとか
ユーザー rio-yuasario-yuasa
提出日時 2023-05-28 10:06:45
言語 Ruby
(3.3.0)
結果
AC  
実行時間 83 ms / 5,000 ms
コード長 236 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 11,504 KB
実行使用メモリ 15,284 KB
最終ジャッジ日時 2023-08-27 06:18:01
合計ジャッジ時間 2,419 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
14,984 KB
testcase_01 AC 83 ms
15,076 KB
testcase_02 AC 77 ms
15,260 KB
testcase_03 AC 78 ms
15,268 KB
testcase_04 AC 74 ms
15,032 KB
testcase_05 AC 75 ms
15,104 KB
testcase_06 AC 76 ms
15,096 KB
testcase_07 AC 75 ms
14,988 KB
testcase_08 AC 78 ms
14,988 KB
testcase_09 AC 76 ms
15,144 KB
testcase_10 AC 75 ms
15,212 KB
testcase_11 AC 77 ms
15,284 KB
testcase_12 AC 81 ms
15,052 KB
testcase_13 AC 78 ms
15,212 KB
testcase_14 AC 75 ms
15,252 KB
testcase_15 AC 76 ms
15,048 KB
testcase_16 AC 75 ms
15,204 KB
testcase_17 AC 77 ms
14,988 KB
testcase_18 AC 77 ms
15,056 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

# 入力された値を文字列で受け取る
input = gets.chomp

xmin, xmax = input.split
a = xmin.to_i
b = xmax.to_i
c = b - a + 1

c.times do |i|
    if (i + a) % 3 == 0 || (i + a).to_s.include?("3")
        puts i + a
    end
end
0