代码拉取完成,页面将自动刷新
#!usr/bin/env python
# -*- coding:utf-8 -*-
# Author:Ma Ping
#求s=a+aa+aaa+aaaa+aa...a的值,其中a是一个数字。例如2+22+222+2222+22222(此时共有5个数相加),几个数相加由键盘控制。
n = int(input('please input number:'))
times = int(input('please input times:'))
n1 = 0
result = 0
for i in range(0,times):
n1 += n * (10 ** i)
if i +1 == times:
print('%d = ' %n1,end='')
else:
print('%d + ' % n1, end='')
result += n1
print(result)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。