結果
| 問題 | No.928 軽減税率? |
| コンテスト | |
| ユーザー |
YamaKasa
|
| 提出日時 | 2019-12-24 23:37:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 590 bytes |
| 記録 | |
| コンパイル時間 | 1,683 ms |
| コンパイル使用メモリ | 166,692 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-22 16:01:02 |
| 合計ジャッジ時間 | 3,160 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 WA * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll my_pow(ll x, ll n) {
if (n == 0) return 1;
if (n % 2 == 0) return my_pow(x * x, n / 2);
return x * my_pow(x, n - 1);
}
int main() {
ll P, Q, A;
cin >> P >> Q >> A;
ll t = my_pow(10, 9);
if (Q == P) {
cout << "0\n";
return 0;
}
int cnt = 0;
for (ll x = 1; x <= A * 200 + 100; x++) {
ll p = (100 + P) * x / 100;
ll q = (100 + Q) * x / 100 + A;
if (p < q) cnt++;
}
if (Q >= P) cnt = t - cnt;
cout << cnt << "\n";
return 0;
}
YamaKasa