結果

問題 No.858 わり算
ユーザー _KingdomOfMoray
提出日時 2020-01-01 13:56:33
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 422 bytes
コンパイル時間 123 ms
コンパイル使用メモリ 12,160 KB
実行使用メモリ 10,112 KB
最終ジャッジ日時 2025-01-07 14:52:44
合計ジャッジ時間 980 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

input_list = list(map(int,input().split()))
a, b = input_list

res_list = []
count = 0
divided = 0
r = 0

while True:
    if count == 0:
        divided = a
    else:
        divided = r * 10
    
    res_list.append(divided // b)
    r = divided % b
    count += 1
    
    if count == 51:
        break
        
res_list_str = [str(e) for e in res_list]
res_list_str.insert(1, '.')
res = ''.join(res_list_str)
print(res)
0