代码:
number = int(input('请输入一个数字:'))
add_count = int(input('请输入相加次数:'))
add_sum = 0
for i in range(1, add_count+1):suming = int(str(number) * i)add_sum += sumingprint(add_sum)
运行结果:
代码:
number = int(input('请输入一个数字:'))
add_count = int(input('请输入相加次数:'))
add_sum = 0
for i in range(1, add_count+1):suming = int(str(number) * i)add_sum += sumingprint(add_sum)
运行结果: