結果
| 問題 |
No.928 軽減税率?
|
| コンテスト | |
| ユーザー |
kazuma
|
| 提出日時 | 2019-11-22 22:40:20 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 671 bytes |
| コンパイル時間 | 2,179 ms |
| コンパイル使用メモリ | 192,360 KB |
| 最終ジャッジ日時 | 2025-01-08 05:17:54 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 WA * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MAX = 1e9;
int main()
{
ios::sync_with_stdio(false), cin.tie(0);
int P, Q, A;
cin >> P >> Q >> A;
if (A == 0) {
if (P >= Q) {
cout << 0 << endl;
return 0;
}
int cnt = 0;
for (ll i = 1; i <= 100; i++) {
cnt += (Q * i / 100 > P * i / 100);
}
cout << cnt << endl;
return 0;
}
if (P == Q) {
if (A == 0) {
cout << 0 << endl;
return 0;
}
cout << MAX << endl;
return 0;
}
if (P < Q) {
cout << MAX << endl;
return 0;
}
int cnt = 0;
for (ll i = 1; i <= 1000000; i++) {
cnt += (Q * i / 100 + A > P * i / 100);
}
cout << cnt << endl;
return 0;
}
kazuma