結果

問題 No.928 軽減税率?
ユーザー maimai
提出日時 2019-11-22 22:17:42
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 249 bytes
コンパイル時間 40 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 22,784 KB
最終ジャッジ日時 2024-04-19 11:48:52
合計ジャッジ時間 4,485 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 TLE -
testcase_02 AC 78 ms
12,416 KB
testcase_03 AC 75 ms
12,288 KB
testcase_04 TLE -
testcase_05 TLE -
testcase_06 TLE -
testcase_07 TLE -
testcase_08 TLE -
testcase_09 TLE -
testcase_10 TLE -
testcase_11 TLE -
testcase_12 TLE -
testcase_13 TLE -
testcase_14 TLE -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 TLE -
testcase_21 TLE -
testcase_22 AC 80 ms
12,288 KB
testcase_23 AC 82 ms
12,416 KB
testcase_24 AC 80 ms
12,160 KB
testcase_25 TLE -
testcase_26 TLE -
testcase_27 TLE -
testcase_28 TLE -
testcase_29 TLE -
testcase_30 TLE -
testcase_31 TLE -
testcase_32 AC 78 ms
12,288 KB
testcase_33 TLE -
testcase_34 TLE -
testcase_35 TLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

x,y,a = gets.split.map(&:to_r)
if x > y
  p (1..1000000).count{|c| ((x/100+1)*c).to_i < ((y/100+1)*c).to_i+a}
elsif a > 0
  p 1000000000
elsif x == y
  p 0
else
  p 1000000000 - (1..1000000).count{|c| ((x/100+1)*c).to_i >= ((y/100+1)*c).to_i+a}
end
0