結果

問題 No.928 軽減税率?
ユーザー 0w1
提出日時 2020-11-15 14:06:03
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 516 bytes
コンパイル時間 1,935 ms
コンパイル使用メモリ 191,600 KB
最終ジャッジ日時 2025-01-16 00:54:55
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 24 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
  int P, Q, A; {
    cin >> P >> Q >> A;
  }

  if (P <= Q) {
    if (A == 0) cout << 0 << endl;
    else {
      int res = 1e9;
      for (int x = 1; x < 200; ++x) {
        res -= (x + Q * x / 100 + A) <= (x + P * x / 100);
      }
      cout << res << endl;
    }
  } else {
    int x = A * 100 / (P - Q) + 200;
    int res = 0;
    while (x > 0) {
      res += (x + Q * x / 100 + A) > (x + P * x / 100);
      --x;
    }
    cout << res << endl;
  }
}
0