結果

問題 No.863 計算量
ユーザー はむ吉🐹はむ吉🐹
提出日時 2019-08-16 21:28:15
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 27 ms / 1,000 ms
コード長 365 bytes
コンパイル時間 585 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 10,032 KB
最終ジャッジ日時 2023-10-23 21:34:08
合計ジャッジ時間 1,417 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,032 KB
testcase_01 AC 27 ms
10,032 KB
testcase_02 AC 27 ms
10,032 KB
testcase_03 AC 27 ms
10,032 KB
testcase_04 AC 26 ms
10,032 KB
testcase_05 AC 26 ms
10,032 KB
testcase_06 AC 26 ms
10,032 KB
testcase_07 AC 27 ms
10,032 KB
testcase_08 AC 27 ms
10,032 KB
testcase_09 AC 26 ms
10,032 KB
testcase_10 AC 26 ms
10,032 KB
testcase_11 AC 26 ms
10,032 KB
testcase_12 AC 26 ms
10,032 KB
testcase_13 AC 26 ms
10,032 KB
testcase_14 AC 26 ms
10,032 KB
testcase_15 AC 27 ms
10,032 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve(a, b):
    n_a = 500
    n_b = 200000
    comp1 = abs(a / n_a - b / n_b) / abs(a / n_a)
    comp2 = abs(a / n_a / n_a - b / n_b / n_b) / abs(a / n_a / n_a)
    if comp1 < comp2:
        return 1
    else:
        return 2


def main():
    a = int(input())
    b = int(input())
    res = solve(a, b)
    print(res)


if __name__ == "__main__":
    main()
0