結果

問題 No.338 アンケート機能
ユーザー ああいい
提出日時 2022-03-02 11:28:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 537 bytes
コンパイル時間 338 ms
コンパイル使用メモリ 82,160 KB
実行使用メモリ 66,584 KB
最終ジャッジ日時 2024-07-16 05:27:14
合計ジャッジ時間 3,250 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B = map(int,input().split())
a,b = 0,0
_min = 10000
for i in range(300):
    for j in range(300):
        if i == 0 and j == 0:
            continue
        t = 1000 * i // (i + j)
        s = 1000 * j // (i + j)
        if t % 10 >= 5:
            t = t // 10 + 1
        else:
            t = t // 10
        if s % 10 >= 5:
            s = s // 10 + 1
        else:
            s = s // 10
        if t == A and s == B:
            if i + j < _min:
                _min = i + j
                a = i
                b = j
print(a,b)
0