結果

問題 No.928 軽減税率?
ユーザー 👑 NachiaNachia
提出日時 2020-10-03 20:08:17
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 556 bytes
コンパイル時間 1,514 ms
コンパイル使用メモリ 164,204 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-25 06:24:43
合計ジャッジ時間 4,487 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
4,380 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 2 ms
4,376 KB
testcase_19 AC 2 ms
4,380 KB
testcase_20 AC 1 ms
4,376 KB
testcase_21 AC 1 ms
4,376 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 2 ms
4,376 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0