Python3 代码
n = int(input())
s = input()
for i in range (12):
m = input().split()
if i == n:
r = 0
for j in range (12):
r += eval(m[j])
if s == 'S':
print (f'{r:.1f}')
else:
print (f'{r/12.0:.1f}')
break;