結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 2 ms
4,376 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 2 ms
4,376 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 AC 2 ms
4,376 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 1 ms
4,376 KB
testcase_22 WA -
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 WA -
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 - 1 - min(l - 1, 399ull);
    for (ULL i = l - min(l - 1, 399ull); i < r + 400; i++) {
        if (i * p / 100 < i * q / 100 + a) ans++;
    }

    cout << ans << endl;

    return 0;
}
0