试题编号: 201903-1
试题名称: 小中大
时间限制: 1.0s
内存限制: 512.0MB
问题描述:


n=int(input())
l=list(map(int,input().split()))
print(max(l),end='')
if n%2==1:
print('',l[int(n/2)],end='')
else:
pr = (l[int(n / 2 - 1)] + l[int(n / 2)]) / 2
if pr%1==0.0:
print('','%.0f' %pr,end='')
else:
print('','%.1f' %pr,end='')
print('',min(l))
试题编号: 201903-2
试题名称: 二十四点
时间限制: 1.0s
内存限制: 512.0MB


n = int(input())
for i in range(n):
s=input()
s = s.replace("/", "//") # //换成整除
s = s.replace("x", "*") # x换成乘法
sum = eval(s) # 执行表达式得出运算结果
if (sum == 24):
print("Yes")
else:
print("No")
for i in range(int(input())):
print('Yes' if eval(input().replace('x', '*').replace('/', '//')) == 24 else 'No')
今天终于能按时干饭了,主要是今天的两题过于简单。
我的炸酱面Pro Max版:

