結果
問題 | 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 = 0elif P == Q:ans = 10**9else:cnt = 0for i in range(1, 10**5+1):Pin = (100+P)*i//100Pout = (100+Q)*i//100+Aif Pin < Pout:cnt += 1ans = 10**9-10**5+cntelse:x = 100*A//(P-Q)ans = max(1, x-1000)-1for i in range(max(1, x-1000), min(10**9, x+1000)+1):Pin = (100+P)*i//100Pout = (100+Q)*i//100+Aif Pin < Pout:ans += 1print(ans)