Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
116468 | 胡海峰老师 | 统计同成绩学生人数 | Python3 | Accepted | 37 MS | 3852 KB | 558 | 2025-04-12 08:38:17 |
#搭建框架 while True: n = int(input()) if n==0: #结束标志 break a = input().split() #100 20 46 78 ---> ['100','20','46','78'] str x = input() #78 x = '78' str cnt =0 for t in range(n): if x == a[t]: #t相当于报数的学号 cnt +=1 print(cnt) # print(n,a,x) # print("算法结束了") #ctrl+c ----> ctrl + v """ 4 70 80 90 100 80 3 65 75 85 55 5 60 90 90 90 85 90 0 Output 1 0 3 """