結果

問題 No.546 オンリー・ワン
ユーザー ueyukiueyuki
提出日時 2017-07-19 23:48:31
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 266 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 17,792 KB
最終ジャッジ日時 2024-04-17 04:13:18
合計ジャッジ時間 3,880 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
17,792 KB
testcase_01 AC 89 ms
12,160 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n, l, h = gets.chomp.split.map(&:to_i)
c = gets.chomp.split.map(&:to_i)

answerCount = 0

l.upto(h) do |i|
  disCount = 0
  0.upto(n-1) do |j|
    if i % c[j] == 0
      disCount += 1
    end
  end
  if disCount == 1
    answerCount += 1
  end
end

puts answerCount
0