結果
問題 | No.928 軽減税率? |
ユーザー |
![]() |
提出日時 | 2019-11-22 23:07:43 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 54 ms / 1,000 ms |
コード長 | 617 bytes |
コンパイル時間 | 162 ms |
コンパイル使用メモリ | 82,376 KB |
実行使用メモリ | 59,904 KB |
最終ジャッジ日時 | 2024-10-11 04:43:41 |
合計ジャッジ時間 | 2,877 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 34 |
ソースコード
from math import floorP, Q, A = map(int, input().split())if P == Q:if A > 0:print(10**9)else:print(0)exit()if P < Q:if A > 0:print(10**9)exit()else:ng = 0for i in range(1, 1000):if floor(P*i/100) == floor(Q*i/100):ng += 1print(10**9-ng)exit()ans = 0for mod in range(100):p = floor(P*mod/100)q = floor(Q*mod/100)k0 = 1 if mod == 0 else 0for k in range(k0, A+1):if P*k + p < Q*k + q + A:ans += 1else:breakprint(ans)