結果

問題 No.338 アンケート機能
ユーザー H3PO4H3PO4
提出日時 2020-06-27 09:10:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 350 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 8,192 KB
最終ジャッジ日時 2023-09-18 19:05:22
合計ジャッジ時間 4,818 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
8,116 KB
testcase_01 AC 120 ms
8,072 KB
testcase_02 AC 115 ms
8,176 KB
testcase_03 AC 117 ms
8,000 KB
testcase_04 AC 115 ms
8,068 KB
testcase_05 AC 114 ms
8,192 KB
testcase_06 AC 105 ms
8,168 KB
testcase_07 AC 100 ms
8,160 KB
testcase_08 AC 118 ms
8,176 KB
testcase_09 AC 100 ms
8,148 KB
testcase_10 AC 105 ms
8,116 KB
testcase_11 AC 115 ms
8,112 KB
testcase_12 AC 104 ms
8,068 KB
testcase_13 AC 115 ms
8,168 KB
testcase_14 AC 106 ms
8,168 KB
testcase_15 AC 103 ms
8,012 KB
testcase_16 AC 115 ms
8,032 KB
testcase_17 AC 102 ms
8,136 KB
testcase_18 AC 116 ms
8,048 KB
testcase_19 AC 104 ms
8,176 KB
testcase_20 AC 105 ms
8,152 KB
testcase_21 AC 115 ms
8,188 KB
testcase_22 AC 115 ms
7,996 KB
testcase_23 AC 114 ms
8,048 KB
testcase_24 AC 109 ms
8,008 KB
testcase_25 AC 106 ms
8,112 KB
testcase_26 AC 114 ms
8,112 KB
testcase_27 AC 113 ms
8,188 KB
testcase_28 AC 111 ms
8,076 KB
testcase_29 AC 113 ms
8,164 KB
testcase_30 AC 107 ms
8,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools


def round_check(N, div, round):
    return div * (2 * round - 1) <= 2 * N < div * (2 * round + 1)


A, B = map(int, input().split())

it = itertools.product(range(500), repeat=2)
next(it)

ans = 2000
for a, b in it:
    if round_check(100 * a, a + b, A) and round_check(100 * b, a + b, B):
        ans = min(ans, a + b)
print(ans)
0