n = int(input()) cnt1 = 0 cnt2 = 0 for i in range(n): x = int(input()) if x >=60: cnt1 += 1 if x >=85: cnt2 += 1 print("{:.0f}%".format(100*cnt1/n)) print("{:.0f}%".format(100*cnt2/n))
蓝桥杯——成绩统计
最新推荐文章于 2024-08-16 16:00:00 发布
n = int(input()) cnt1 = 0 cnt2 = 0 for i in range(n): x = int(input()) if x >=60: cnt1 += 1 if x >=85: cnt2 += 1 print("{:.0f}%".format(100*cnt1/n)) print("{:.0f}%".format(100*cnt2/n))