반응형 통계학1 백준 2108 : 통계학 (파이썬) 통계학https://www.acmicpc.net/problem/2108코드# https://teching.tistory.com/import syscnt = [0 for _ in range(8001)]n = int(sys.stdin.readline().rstrip())total = 0maxN = -4000minN = 4000for _ in range(n): num = int(sys.stdin.readline().rstrip()) cnt[num+4000] += 1 total += num maxN = max(maxN, num) minN = min(minN, num)mode = []index = 0for i in range(8001): num = i-4000 if cnt[i.. 2022. 1. 31. 이전 1 다음 반응형