結果

問題 No.338 アンケート機能
ユーザー GrayCoder
提出日時 2018-08-13 15:32:47
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 439 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 17,700 KB
最終ジャッジ日時 2024-09-24 08:02:38
合計ジャッジ時間 4,458 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 3 TLE * 1 -- * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin, stdout

input = lambda: stdin.readline()
write = stdout.write

def main():
    A, B = map(int, input().split())

    rnd = lambda x: (x * 2 + 1) // 2
    a = 1 if A else 0
    b = 1 if B else 0
    while 1:
        if A and rnd(a / (a + b) * 100) < A:
            a += 1
            continue
        if B and rnd(b / (a + b) * 100) < B:
            b += 1
            continue
        break
    print(a + b)

main()
0