結果

問題 No.858 わり算
ユーザー seiyu
提出日時 2020-10-20 00:59:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 421 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 80,256 KB
最終ジャッジ日時 2024-07-21 08:12:24
合計ジャッジ時間 1,775 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if '.' in str(a / b):
    # print(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