結果

問題 No.338 アンケート機能
ユーザー rlangevinrlangevin
提出日時 2023-01-14 12:17:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 297 ms / 2,000 ms
コード長 429 bytes
コンパイル時間 306 ms
コンパイル使用メモリ 10,472 KB
実行使用メモリ 8,968 KB
最終ジャッジ日時 2023-08-26 18:42:29
合計ジャッジ時間 10,818 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 293 ms
8,952 KB
testcase_01 AC 292 ms
8,880 KB
testcase_02 AC 286 ms
8,868 KB
testcase_03 AC 291 ms
8,900 KB
testcase_04 AC 290 ms
8,800 KB
testcase_05 AC 293 ms
8,868 KB
testcase_06 AC 289 ms
8,876 KB
testcase_07 AC 295 ms
8,900 KB
testcase_08 AC 293 ms
8,912 KB
testcase_09 AC 287 ms
8,816 KB
testcase_10 AC 297 ms
8,900 KB
testcase_11 AC 287 ms
8,864 KB
testcase_12 AC 291 ms
8,900 KB
testcase_13 AC 297 ms
8,916 KB
testcase_14 AC 288 ms
8,872 KB
testcase_15 AC 294 ms
8,900 KB
testcase_16 AC 290 ms
8,876 KB
testcase_17 AC 292 ms
8,900 KB
testcase_18 AC 288 ms
8,924 KB
testcase_19 AC 296 ms
8,924 KB
testcase_20 AC 287 ms
8,808 KB
testcase_21 AC 294 ms
8,856 KB
testcase_22 AC 290 ms
8,868 KB
testcase_23 AC 285 ms
8,808 KB
testcase_24 AC 291 ms
8,880 KB
testcase_25 AC 290 ms
8,864 KB
testcase_26 AC 285 ms
8,860 KB
testcase_27 AC 285 ms
8,884 KB
testcase_28 AC 293 ms
8,872 KB
testcase_29 AC 289 ms
8,960 KB
testcase_30 AC 290 ms
8,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import *

A, B = map(int, input().split())
ans = 10**18
for a in range(305):
    for b in range(305):
        if a + b == 0:
            continue
        x = Decimal(100 * a)/(a + b)
        x = x.quantize(Decimal('0'), rounding=ROUND_HALF_UP)
        y = Decimal(100 * b)/(a + b)
        y = y.quantize(Decimal('0'), rounding=ROUND_HALF_UP)
        if x == A and y == B:
            ans = min(ans, a + b)
print(ans)
0