# 第1题 n = int(input()) nums = list(map(int, input().split())) nums.sort(reverse=True) print(nums) dic = {} cost = 0 i = 1 while i < n: cout = 1 while i <= n-1 and nums[i] == nums[i-1]: i += 1 cout += 1 if cout in dic: print('i:',i) cost += cout * n...