結果
問題 |
No.338 アンケート機能
|
ユーザー |
![]() |
提出日時 | 2016-04-28 21:44:05 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 81 ms / 2,000 ms |
コード長 | 358 bytes |
コンパイル時間 | 390 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 75,520 KB |
最終ジャッジ日時 | 2024-11-08 03:08:36 |
合計ジャッジ時間 | 3,683 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
def equal(p, q, x): return q * (2 * x - 1) <= 2 * p < q * (2 * x + 1) A, B = map(int, input().split()) ans = (999999, 999999) for a in range(1000): for b in range(1000): s = a + b if s == 0: continue if equal(100 * a, s, A) and equal(100 * b, s, B) and a + b < sum(ans): ans = (a, b) print(sum(ans))