import time
'''
输出指定格式日期
'''
def _61():
print(time.strftime('%Y年%m月%d日 %H点%M分%S秒'))
'''
输入一行字符,统计英文字母,空格,数字和其他字符的个数
'''
def _62():
string = input('请输入一串字符:')
alpha, space, number, others = 0, 0, 0, 0
for i in string:
if i.isalpha():
alpha += 1
elif i.isspace():
space += 1
elif i.isdigit():
number += 1
else:
others += 1
print('英文字母有{0}个,空格有{1}个,数字有{2}个,其他字符有{3}个'.format(alpha, space, number, others))
'''
求s=a+aa+aaa+aaaa+aa···aa的值,数字a及相加数字个数由键入值决定
'''
def _63():
a = int(input('请输入一位数字:'))
num = int(input('请输入相加次数:'))
s, sum = 0, 0
for i in range(num):
s += a*(10**i)
sum += s
print('和为', sum)
'''
输出1000以内的所有完数
'''
def _64():
count = 0
for i in range(1, 1001):
list = []
for j in range(1, i):
if i % j == 0:
list.append(j)
if sum(list) == i:
count += 1
print(i)
print('1000以内完数有%d个' % count)