結果

問題 No.858 わり算
ユーザー roarisroaris
提出日時 2019-08-09 22:42:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 347 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 10,688 KB
実行使用メモリ 9,008 KB
最終ジャッジ日時 2023-09-26 20:57:14
合計ジャッジ時間 981 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
8,836 KB
testcase_01 AC 22 ms
9,008 KB
testcase_02 AC 22 ms
8,828 KB
testcase_03 AC 21 ms
8,900 KB
testcase_04 AC 20 ms
8,908 KB
testcase_05 AC 20 ms
8,812 KB
testcase_06 AC 20 ms
8,916 KB
testcase_07 WA -
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import *

A, B = map(int, input().split())
a = Decimal(str(A))
b = Decimal(str(B))
getcontext().prec = 200
ans = str(a/b)
if '.' not in ans:
    ans += '.' + '0' * 100
elif len(ans) < 52:
    ans += '0' * 100

for i in range(len(ans)):
    if ans[i] == '.':
        mark = i
        break
    
print(ans[:mark+1]+ans[mark+1:mark+51])
0