結果

問題 No.858 わり算
ユーザー ThetaTheta
提出日時 2022-10-19 13:22:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 10,740 KB
実行使用メモリ 9,008 KB
最終ジャッジ日時 2023-09-12 03:18:07
合計ジャッジ時間 1,028 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
8,908 KB
testcase_01 AC 20 ms
8,932 KB
testcase_02 AC 20 ms
9,008 KB
testcase_03 AC 20 ms
9,004 KB
testcase_04 AC 20 ms
8,988 KB
testcase_05 AC 20 ms
8,760 KB
testcase_06 AC 20 ms
8,864 KB
testcase_07 AC 20 ms
9,000 KB
testcase_08 AC 20 ms
8,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import ROUND_DOWN, Decimal, Context, setcontext


def main():
    context = Context(prec=70, rounding=ROUND_DOWN)
    setcontext(context)
    A, B = map(int, input().split())
    result = Decimal(A) / Decimal(B)
    result.quantize(Decimal("." + "0"*49 + "1"))
    print(f"{result:.50f}")


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