結果

問題 No.928 軽減税率?
ユーザー 0w10w1
提出日時 2020-11-15 14:03:10
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 398 bytes
コンパイル時間 2,115 ms
コンパイル使用メモリ 191,856 KB
最終ジャッジ日時 2025-01-16 00:54:46
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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) cout << 1000000000 << endl;
    else cout << 0 << endl;
  } else {
    int x = A * 100 / (P - Q) + 200;
    int res = 0;
    while (x > 0) {
      res += (x + (int64_t) Q * x / 100 + A) > (x + (int64_t) P * x / 100);
      --x;
    }
    cout << res << endl;
  }
}
0