結果

問題 No.858 わり算
ユーザー L-aquaL-aqua
提出日時 2020-01-14 21:16:54
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 243 bytes
コンパイル時間 333 ms
コンパイル使用メモリ 87,180 KB
実行使用メモリ 71,560 KB
最終ジャッジ日時 2023-08-27 03:26:53
合計ジャッジ時間 1,806 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

a, b = map(int, input().split())
print(a//b, end=".")
a -= b*(a//b)

def next_digit(n, m): # n < mのときしか使えない
    d = (n*10) // m
    print(d, end="")
    return 10*n - m*d

for i in range(50):
    a = next_digit(a, b)

print()
0