結果

問題 No.207 世界のなんとか
ユーザー t_muranot_murano
提出日時 2015-09-19 16:34:18
言語 Crystal
(1.10.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 235 bytes
コンパイル時間 18,515 ms
コンパイル使用メモリ 254,372 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-13 08:47:04
合計ジャッジ時間 17,496 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,380 KB
testcase_01 AC 3 ms
4,376 KB
testcase_02 AC 3 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,432 KB
testcase_06 AC 3 ms
4,380 KB
testcase_07 AC 2 ms
4,408 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 3 ms
4,392 KB
testcase_11 AC 2 ms
4,504 KB
testcase_12 AC 3 ms
4,376 KB
testcase_13 AC 2 ms
4,432 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 2 ms
4,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b = gets.not_nil!.split.map{|x| x.to_i}

a.upto(b) do |num|
  if num % 3 == 0
    puts num
    next
  end

  flag = num.to_s.split("").any? do |c|
    if c == "3"
      true
    else
      false
    end
  end
  puts num if flag
end
0