結果

問題 No.804 野菜が苦手
ユーザー object1234object1234
提出日時 2019-03-26 22:01:13
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 130 bytes
コンパイル時間 63 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,160 KB
最終ジャッジ日時 2024-04-19 08:59:29
合計ジャッジ時間 2,542 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
12,032 KB
testcase_01 WA -
testcase_02 AC 75 ms
12,032 KB
testcase_03 AC 75 ms
12,032 KB
testcase_04 AC 75 ms
12,160 KB
testcase_05 AC 78 ms
12,160 KB
testcase_06 WA -
testcase_07 AC 82 ms
12,160 KB
testcase_08 AC 86 ms
12,160 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 85 ms
11,904 KB
testcase_15 AC 86 ms
12,160 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 84 ms
12,160 KB
testcase_19 AC 85 ms
12,032 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - b
Syntax OK

ソースコード

diff #

a,b,c,d = gets.chomp.split(" ").map(&:to_i)
res = 0
(1..a).each do |i|
    if i + i * c  <= d
        res = i
    end
end
puts res
0