結果

問題 No.338 アンケート機能
ユーザー kimiyukikimiyuki
提出日時 2016-01-29 23:22:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 376 bytes
コンパイル時間 460 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 10,216 KB
最終ジャッジ日時 2023-10-21 17:25:12
合計ジャッジ時間 2,668 ms
ジャッジサーバーID
(参考情報)
judge10 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
10,216 KB
testcase_01 AC 34 ms
10,216 KB
testcase_02 AC 34 ms
10,216 KB
testcase_03 AC 36 ms
10,216 KB
testcase_04 AC 35 ms
10,216 KB
testcase_05 WA -
testcase_06 AC 34 ms
10,216 KB
testcase_07 WA -
testcase_08 AC 35 ms
10,216 KB
testcase_09 WA -
testcase_10 AC 36 ms
10,216 KB
testcase_11 AC 35 ms
10,216 KB
testcase_12 AC 35 ms
10,216 KB
testcase_13 AC 35 ms
10,216 KB
testcase_14 AC 34 ms
10,216 KB
testcase_15 AC 36 ms
10,216 KB
testcase_16 AC 34 ms
10,216 KB
testcase_17 AC 36 ms
10,216 KB
testcase_18 AC 34 ms
10,216 KB
testcase_19 AC 35 ms
10,216 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 34 ms
10,216 KB
testcase_24 AC 36 ms
10,216 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 35 ms
10,216 KB
testcase_29 AC 34 ms
10,216 KB
testcase_30 AC 36 ms
10,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import math
def rounddiv(p,q):
    r = math.gcd(p,q)
    p //= r
    q //= r
    return p//q + (2*(p%q) >= q)
a, b = map(int,input().split())
z = float('inf')
for x in range(100):
    for y in range(100):
        if x == y == 0:
            continue
        if rounddiv(100*x,x+y) == a and rounddiv(100*y,x+y) == b:
            z = min(z, x+y)
print(z)
0