結果

問題 No.338 アンケート機能
ユーザー 🍡yurahuna🍡yurahuna
提出日時 2016-04-28 21:44:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 64 ms / 2,000 ms
コード長 358 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 82,316 KB
実行使用メモリ 75,944 KB
最終ジャッジ日時 2024-04-25 15:59:44
合計ジャッジ時間 3,160 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
75,944 KB
testcase_01 AC 59 ms
70,284 KB
testcase_02 AC 58 ms
63,956 KB
testcase_03 AC 64 ms
71,740 KB
testcase_04 AC 55 ms
66,696 KB
testcase_05 AC 59 ms
64,568 KB
testcase_06 AC 51 ms
65,312 KB
testcase_07 AC 49 ms
63,300 KB
testcase_08 AC 62 ms
69,740 KB
testcase_09 AC 53 ms
65,020 KB
testcase_10 AC 58 ms
71,472 KB
testcase_11 AC 60 ms
69,864 KB
testcase_12 AC 58 ms
71,176 KB
testcase_13 AC 61 ms
68,636 KB
testcase_14 AC 58 ms
72,560 KB
testcase_15 AC 58 ms
70,176 KB
testcase_16 AC 62 ms
71,912 KB
testcase_17 AC 58 ms
70,232 KB
testcase_18 AC 61 ms
72,776 KB
testcase_19 AC 54 ms
66,032 KB
testcase_20 AC 57 ms
67,032 KB
testcase_21 AC 57 ms
65,800 KB
testcase_22 AC 60 ms
66,668 KB
testcase_23 AC 57 ms
64,208 KB
testcase_24 AC 55 ms
66,476 KB
testcase_25 AC 55 ms
66,828 KB
testcase_26 AC 60 ms
66,756 KB
testcase_27 AC 58 ms
66,588 KB
testcase_28 AC 57 ms
64,708 KB
testcase_29 AC 58 ms
64,740 KB
testcase_30 AC 55 ms
66,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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))
0