結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 TLE -
testcase_02 AC 77 ms
12,416 KB
testcase_03 AC 74 ms
12,416 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 74 ms
12,416 KB
testcase_23 AC 75 ms
12,160 KB
testcase_24 AC 72 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 81 ms
12,288 KB
testcase_33 TLE -
testcase_34 TLE -
testcase_35 TLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

x,y,a = gets.split.map(&:to_f)
if x > y
  p (1..5000000).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..5000000).count{|c| ((x/100+1)*c).to_i == ((y/100+1)*c).to_i+a}
end
0