結果
| 問題 |
No.928 軽減税率?
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-26 13:12:38 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 1,000 ms |
| コード長 | 513 bytes |
| コンパイル時間 | 818 ms |
| コンパイル使用メモリ | 66,304 KB |
| 最終ジャッジ日時 | 2025-01-10 01:55:42 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 34 |
ソースコード
#include <iostream>
using lint = long long;
constexpr int M = 10000000,
X = 1000000000;
void solve() {
lint p, q, a;
std::cin >> p >> q >> a;
int ans = 0;
for (lint m = 1; m <= M; ++m) {
auto x = m * (p + 100) / 100;
auto y = m * (q + 100) / 100 + a;
if (x < y) ++ans;
}
std::cout << (ans > M / 2 ? X - (M - ans) : ans) << std::endl;
}
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
solve();
return 0;
}