|
|
вернуться в форумWA 6, python 3.8, plz help me n, m = map(int, input().split()) a = [] b = [1] c = [] for i in range(m): f = int(input()) a.append(f) a = sorted(a) f = 0 for i in range(1, len(a)): if a[i] == a[i - 1]: b[f] += 1 elif a[i] != a[i - 1]: b.append(1) f += 1 for i in range(len(b)): b[i] = float(b[i] / m * 100) for i in range(len(b)): c.append('%.2f' % b[i] + '%') for i in range(n): try: print(c[i]) except: print('0.00%') |
|
|