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