結果
問題 |
No.928 軽減税率?
|
ユーザー |
👑 ![]() |
提出日時 | 2020-10-03 20:08:17 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 556 bytes |
コンパイル時間 | 1,454 ms |
コンパイル使用メモリ | 167,064 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-18 05:24:10 |
合計ジャッジ時間 | 2,511 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 20 WA * 14 |
ソースコード
#include<bits/stdc++.h> using namespace std; using LL = long long; using ULL = unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) int main() { ULL p, q, a; cin >> p >> q >> a; p += 100; q += 100; ULL l = 0, r = 1000000001; while (l + 1 < r) { ULL m = (l + r) / 2; if (m * p / 100 < m * q / 100 + a) l = m; else r = m; } ULL ans = l - min(l, 400ull); for (ULL i = l - 399; i < r + 400; i++) { if (i * p / 100 < i * q / 100 + a) ans++; } cout << ans << endl; return 0; }