結果

問題 No.928 軽減税率?
ユーザー pekempeypekempey
提出日時 2019-11-23 06:52:58
言語 OCaml
(5.1.0)
結果
WA  
実行時間 -
コード長 361 bytes
コンパイル時間 237 ms
コンパイル使用メモリ 21,700 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-17 08:51:34
合計ジャッジ時間 1,649 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 11 ms
5,376 KB
testcase_03 AC 5 ms
5,376 KB
testcase_04 AC 4 ms
5,376 KB
testcase_05 AC 6 ms
5,376 KB
testcase_06 AC 6 ms
5,376 KB
testcase_07 AC 9 ms
5,376 KB
testcase_08 AC 7 ms
5,376 KB
testcase_09 AC 9 ms
5,376 KB
testcase_10 AC 7 ms
5,376 KB
testcase_11 AC 6 ms
5,376 KB
testcase_12 AC 12 ms
5,376 KB
testcase_13 AC 6 ms
5,376 KB
testcase_14 AC 11 ms
5,376 KB
testcase_15 AC 5 ms
5,376 KB
testcase_16 AC 10 ms
5,376 KB
testcase_17 AC 13 ms
5,376 KB
testcase_18 AC 13 ms
5,376 KB
testcase_19 AC 13 ms
5,376 KB
testcase_20 AC 13 ms
5,376 KB
testcase_21 AC 12 ms
5,376 KB
testcase_22 AC 1 ms
5,376 KB
testcase_23 AC 2 ms
5,376 KB
testcase_24 AC 11 ms
5,376 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 2 ms
5,376 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

open Scanf
open Printf

let () =
  let p, q, a = scanf "%d %d %d" (fun x y z -> x, y, z) in
  let ans = ref 0 in
  for i = 1 to a * 300 do
    if (p + 100) * i / 100 < (q + 100) * i / 100 + a then
      incr ans
  done;
  if (p + 100) * 1000000000 / 100 < (q + 100) * 1000000000 / 100 + a then
    ans := !ans + (1000000000 - a * 300);
  printf "%d\n" !ans

  
0