Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://codeforces.com/group/Ly2TbDDpGd/contest/253504/problem/F
- n = int(input())
- x = (input())
- second = x.split()
- second = list(map(int, second))
- for i in second:
- second.remove(i)
- while True:
- if i in second and i >= 1:
- i -= 1
- continue
- break
- second.append(i)
- print(sum(second))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement