結果

問題 No.338 アンケート機能
ユーザー lenoleno
提出日時 2017-08-18 02:52:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 569 bytes
コンパイル時間 427 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-04-22 14:58:03
合計ジャッジ時間 2,838 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import math


def _round(num):
    if (num % 1) < 0.5:
        return math.floor(num)
    else:
        return math.ceil(num)


if __name__ == '__main__':
    A, B = [int(i) for i in input().split()]
    ans = []
    for a in range(1, 101):
        for b in range(1, 101):
            tA = (100 * a) / (a + b)
            tB = (100 * b) / (a + b)
            rA = _round(tA)
            rB = _round(tB)
            if (_round((100 * a) / (a + b)) == A) and (_round((100 * b) / (a + b)) == B):
                ans.append(a + b)
    print(min(ans))
0