#33464: python解答


watinsin (Mizuhara Chizuru)

學校 : 海山國中
編號 : 199995
來源 : [114.44.62.125]
最後登入時間 :
2024-08-05 12:15:10
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