結果

問題 No.338 アンケート機能
ユーザー mlihua09mlihua09
提出日時 2020-09-16 15:48:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 374 bytes
コンパイル時間 1,417 ms
コンパイル使用メモリ 86,932 KB
実行使用メモリ 76,196 KB
最終ジャッジ日時 2023-09-04 03:36:46
合計ジャッジ時間 4,634 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
75,972 KB
testcase_01 AC 78 ms
75,780 KB
testcase_02 AC 77 ms
75,968 KB
testcase_03 AC 80 ms
76,076 KB
testcase_04 AC 77 ms
75,620 KB
testcase_05 AC 76 ms
75,708 KB
testcase_06 AC 77 ms
75,796 KB
testcase_07 AC 76 ms
75,748 KB
testcase_08 AC 76 ms
75,868 KB
testcase_09 AC 76 ms
75,632 KB
testcase_10 AC 78 ms
76,004 KB
testcase_11 AC 77 ms
75,956 KB
testcase_12 AC 78 ms
76,012 KB
testcase_13 AC 77 ms
75,988 KB
testcase_14 AC 79 ms
75,720 KB
testcase_15 AC 78 ms
76,196 KB
testcase_16 AC 77 ms
75,872 KB
testcase_17 AC 77 ms
75,904 KB
testcase_18 AC 77 ms
75,720 KB
testcase_19 AC 78 ms
75,932 KB
testcase_20 AC 78 ms
76,124 KB
testcase_21 AC 76 ms
75,720 KB
testcase_22 AC 78 ms
75,924 KB
testcase_23 AC 79 ms
75,916 KB
testcase_24 AC 77 ms
75,944 KB
testcase_25 AC 77 ms
75,976 KB
testcase_26 AC 78 ms
75,940 KB
testcase_27 AC 77 ms
75,844 KB
testcase_28 AC 78 ms
75,972 KB
testcase_29 AC 78 ms
76,048 KB
testcase_30 AC 78 ms
75,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


ans = 200

A, B = map(int, input().split())
A *= 10
B *= 10
if A < B:
    A, B = B, A
    
ans = 200
    
for i in range(1, 201):
    
    for j in range(i + 1):
        
        a = (1000 * i) // (i + j)
        b = (1000 * j) // (i + j)
        
        if A - 5 <= a < A + 5 and B - 5 <= b < B + 5:
            
            ans = min(ans, i + j)
            
print(ans)
0