結果

問題 No.338 アンケート機能
ユーザー lloyzlloyz
提出日時 2023-02-22 20:41:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 471 bytes
コンパイル時間 748 ms
コンパイル使用メモリ 10,916 KB
実行使用メモリ 9,064 KB
最終ジャッジ日時 2023-09-30 03:33:38
合計ジャッジ時間 3,756 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
8,892 KB
testcase_01 AC 57 ms
9,052 KB
testcase_02 AC 59 ms
8,876 KB
testcase_03 AC 58 ms
8,844 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 59 ms
8,876 KB
testcase_09 WA -
testcase_10 AC 58 ms
8,900 KB
testcase_11 AC 59 ms
8,900 KB
testcase_12 AC 57 ms
8,896 KB
testcase_13 AC 57 ms
8,844 KB
testcase_14 AC 58 ms
8,896 KB
testcase_15 AC 58 ms
8,952 KB
testcase_16 AC 58 ms
8,872 KB
testcase_17 AC 59 ms
8,904 KB
testcase_18 AC 59 ms
8,908 KB
testcase_19 AC 57 ms
8,968 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 59 ms
8,844 KB
testcase_24 AC 58 ms
8,904 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 58 ms
8,876 KB
testcase_29 AC 58 ms
8,936 KB
testcase_30 AC 58 ms
8,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import Decimal, ROUND_HALF_UP

a, b = map(int, input().split())

ans = 10000
for i in range(1, 101):
    for j in range(1, 101):
        ii = Decimal(str(i))
        jj = Decimal(str(j))
        ra = 100 * ii / (ii + jj)
        rb = 100 * jj / (ii + jj)
        ra = ra.quantize(Decimal('0'), rounding=ROUND_HALF_UP)
        rb = rb.quantize(Decimal('0'), rounding=ROUND_HALF_UP)
        if ra == a and rb == b:
            ans = min(ans, i + j)
print(ans)
0