結果

問題 No.858 わり算
ユーザー seiyuseiyu
提出日時 2020-10-20 00:56:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 403 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 87,132 KB
実行使用メモリ 89,152 KB
最終ジャッジ日時 2023-09-28 13:31:37
合計ジャッジ時間 3,202 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 223 ms
88,716 KB
testcase_02 AC 222 ms
88,960 KB
testcase_03 AC 222 ms
89,044 KB
testcase_04 WA -
testcase_05 AC 223 ms
88,836 KB
testcase_06 AC 221 ms
88,964 KB
testcase_07 WA -
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import *
import math
getcontext().prec = 51
a,b =(x for x in input().split())
a = Decimal(a)
b = Decimal(b)

if '.' in str(a/b): 
    ans1 = str(a / b).split('.')[0]
    ans2 = str(a / b).split('.')[1][0:50]
    while len(ans2) != 50:
        ans2 += "0"
    print(ans1 + '.' + ans2)
else:
    ans = str(a / b)
    ans += "."
    for i in range(50):
        ans += "0"

    print(ans)





0