正文
电梯上下
import sys
import math
# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.
log = input()
print(log.count('(') - log.count(')'))
数字规约
import sys
import math
# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.
n = input()
count = 0
while int(n) >=9:
n = sum(int(s) for s in str(n))
count += 1
print(n,count)
# print(sum([int(s) for s in n]),1)
这样也可(JunCe_Tian)
n=int(input())
i=0
while n>9:n=sum(map(int,list(str(n))));i+=1
print(n,i)
平均值
import sys
import math
# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.
n = int(input())
mysunm = sum([int(x) for x in input().split()])
print(mysunm//n if int(mysunm//n) == mysunm/n else mysunm/n)
平方和
import sys
import math
# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.
n = int(input())
print(sum(int(x)**2 for x in input().split()))
写在最后
欢迎技术类的问题到这里提出,我会逐个解答