結果

問題 No.207 世界のなんとか
ユーザー tshigtshig
提出日時 2016-08-18 11:55:44
言語 Ruby
(3.3.0)
結果
AC  
実行時間 82 ms / 5,000 ms
コード長 271 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 11,488 KB
実行使用メモリ 15,340 KB
最終ジャッジ日時 2023-08-07 15:03:43
合計ジャッジ時間 2,610 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,340 KB
testcase_01 AC 81 ms
15,316 KB
testcase_02 AC 82 ms
15,280 KB
testcase_03 AC 78 ms
15,308 KB
testcase_04 AC 78 ms
15,332 KB
testcase_05 AC 78 ms
15,168 KB
testcase_06 AC 78 ms
15,116 KB
testcase_07 AC 78 ms
15,020 KB
testcase_08 AC 78 ms
15,032 KB
testcase_09 AC 78 ms
15,248 KB
testcase_10 AC 77 ms
15,264 KB
testcase_11 AC 78 ms
15,164 KB
testcase_12 AC 77 ms
15,028 KB
testcase_13 AC 77 ms
15,020 KB
testcase_14 AC 77 ms
15,128 KB
testcase_15 AC 77 ms
15,308 KB
testcase_16 AC 77 ms
15,316 KB
testcase_17 AC 76 ms
15,084 KB
testcase_18 AC 76 ms
15,276 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

class Calc0207
  def initialize(args)
    args = args.map { |l| l.chomp.split(/\s+/) }
    @a, @b = args.shift.map(&:to_i)
  end

  def run
    (@a..@b).select { |n| n % 3 == 0 || n.to_s.include?('3') }
  end
end

puts Calc0207.new(STDIN.readlines).run if __FILE__ == $0
0