num=[] n=int(input()) num = [int(i) for i in input().split()] num.sort() for i in range(n): print(num[i] ,end=' ' ) print() for i in range(n-1,-1,-1): if num[i]<60: print(num[i]) break for i in range(n): if num[0]>=60: print("best case") break elif num[i]>=60: print(num[i]) break elif num[n-1]<60: print("worst case") break
num=[] n=int(input()) num = [int(i) for i in input().split()] num.sort() for i in range(n): print(num[i] ,end=' ' ) print() for i in range(n-1,-1,-1): if num[i]<60: print(num[i]) break for i in range(n): if num[0]>=60: print("best case") break elif num[i]>=60: print(num[i]) break elif num[n-1]<60: print("worst case") break
輸出best case之後,你沒有輸出最低成績
num=[] n=int(input()) num = [int(i) for i in input().split()] num.sort() for i in range(n): print(num[i] ,end=' ' ) print() for i in range(n-1,-1,-1): if num[i]<60: print(num[i]) break for i in range(n): if num[0]>=60: print("best case") break elif num[i]>=60: print(num[i]) break elif num[n-1]<60: print("worst case") break
輸出best case之後,你沒有輸出最低成績
謝謝 AC 了