結果

問題 No.858 わり算
ユーザー stngstng
提出日時 2022-07-24 15:47:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 321 bytes
コンパイル時間 671 ms
コンパイル使用メモリ 86,552 KB
実行使用メモリ 71,304 KB
最終ジャッジ日時 2023-09-20 15:14:24
合計ジャッジ時間 1,766 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

wa = 0#敢えて-1している(ダメな方)
a *= 10**51
ac = a//b+1#OKな方
cnt = a//b
while abs(ac-wa)>1:
    mid = (wa + ac) //2
    #print(ac,mid)
    
    #判定書く
    if b*mid > a:
        ac = mid
    else:
        wa = mid
    cnt += 1
str = str(ac)[:-1]
print("0."+str)
0