此题可以用 Python ,因为 Python 的高精度。
注意点:要取整。
对于第一个问题,可以用 Python 的整除符号//,得出代码。
a=int(input())
b=int(input())
print(a//b)提交记录:https://www.luogu.com.cn/record/245956465 ,为什么没 AC 呢?因为数太大了,答案 ≤13!,N、M ≤6250!。所以加上几行代码:
import sys
sys.set_int_max_str_digits(0)AC CODE:
import sys
sys.set_int_max_str_digits(0)
a=int(input())
b=int(input())
print(a//b)