結果
問題 |
No.928 軽減税率?
|
ユーザー |
![]() |
提出日時 | 2019-11-22 23:04:20 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 667 bytes |
コンパイル時間 | 280 ms |
コンパイル使用メモリ | 82,040 KB |
実行使用メモリ | 66,780 KB |
最終ジャッジ日時 | 2024-10-11 04:42:12 |
合計ジャッジ時間 | 3,442 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 RE * 13 |
ソースコード
from math import floor P, Q, A = map(int, input().split()) if P == Q: if A > 0: print(10**9) else: print(0) exit() if P < Q: assert(False) if A > 0: print(10**9) exit() else: ng = 0 for i in range(1, 101): if floor(P*i/100) == floor(Q*i/100): ng += 1 else: print(10**9-ng) exit() ans = 0 for mod in range(100): p = floor(P*mod/100) q = floor(Q*mod/100) k0 = 1 if mod == 0 else 0 for k in range(k0, A+1): if P*k + p < Q*k + q + A: ans += 1 else: break print(ans)