結果

問題 No.858 わり算
ユーザー simamumusimamumu
提出日時 2019-08-09 21:31:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 551 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 11,136 KB
実行使用メモリ 10,136 KB
最終ジャッジ日時 2023-09-26 17:17:48
合計ジャッジ時間 1,365 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,040 KB
testcase_01 AC 32 ms
10,136 KB
testcase_02 AC 32 ms
9,992 KB
testcase_03 WA -
testcase_04 AC 32 ms
10,100 KB
testcase_05 AC 32 ms
9,940 KB
testcase_06 AC 32 ms
9,972 KB
testcase_07 AC 32 ms
9,988 KB
testcase_08 AC 32 ms
9,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

A,B = inpl()
if A > B:
    ans = str(A//B) + '.'
    A = A%B*10
else:
    ans = '0.'
    A *= 10

for _ in range(50):
    if A < B:
        ans += '0'
    else:
        tmp = A//B
        A = A%B
        ans += str(tmp)
    A *= 10

print(ans)
0