输入样例:
123456789050987654321 7
输出样例:
17636684150141093474 3
# -*- coding: utf-8 -*-
import redef big_division(a, b):q_list, r = [], 0len_a = len(a)for i in range(0, len_a):dividend = 10 * r + eval(a[i])q_list.append(dividend // eval(b))r = dividend % eval(b)if len(q_list) == 1 and q_list[0] == 0:return q_list[0], rq = eval(re.sub(r'^[0]{1,100}', '', ''.join(list(map(str, q_list)))))return q, rif __name__ == '__main__':input_list = input().split()a = input_list[0]b = input_list[1]result = big_division(a, b)print(result[0], result[1])