結果
問題 | No.928 軽減税率? |
ユーザー |
![]() |
提出日時 | 2020-02-19 20:57:04 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 87 ms / 1,000 ms |
コード長 | 567 bytes |
コンパイル時間 | 254 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-10-08 18:16:20 |
合計ジャッジ時間 | 2,916 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 34 |
ソースコード
P,Q,A = map(int, input().split()) if P-Q <= 0: if P == Q and A == 0: ans = 0 elif P == Q: ans = 10**9 else: cnt = 0 for i in range(1, 10**5+1): Pin = (100+P)*i//100 Pout = (100+Q)*i//100+A if Pin < Pout: cnt += 1 ans = 10**9-10**5+cnt else: x = 100*A//(P-Q) ans = max(1, x-1000)-1 for i in range(max(1, x-1000), min(10**9, x+1000)+1): Pin = (100+P)*i//100 Pout = (100+Q)*i//100+A if Pin < Pout: ans += 1 print(ans)