#33464: python解答


watinsin (Mizuhara Chizuru)

學校 : 海山高中國中部
編號 : 199995
來源 : [118.160.105.98]
最後登入時間 :
2023-09-24 19:38:19
b964. 1. 成績指標 -- 2016年3月apcs | From: [125.228.60.51] | 發表日期 : 2023-01-07 21:11

n=int(input())
list1=[int(x) for x in input().split()]
list1.sort()
print(*list1)
if list1[-1]<60:
  highnotpass=list1[-1]
  lowpass='worst case'
  print(highnotpass)
  print(lowpass)
elif list1[0]>=60:
  highnotpass='best case'
  lowpass=list1[0]
  print(highnotpass)
  print(lowpass)
else:
  for i in range(n):    
    highnotpass=list1[i]
    lowpass=list1[i+1]
    if lowpass>=60:
      break
  print(highnotpass)
  print(lowpass)

 
ZeroJudge Forum