SHARE
TWEET

Questão F

Shivaram-Agnijan Sep 21st, 2019 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. https://codeforces.com/group/Ly2TbDDpGd/contest/253504/problem/F
  2.  
  3. n = int(input())
  4. x = (input())
  5. second = x.split()
  6. second = list(map(int, second))
  7. for i in second:
  8.     second.remove(i)
  9.     while True:
  10.         if i in second and i >= 1:
  11.             i -= 1
  12.             continue
  13.         break
  14.     second.append(i)
  15.  
  16.  
  17. print(sum(second))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top