fork download
  1. # your code goes here
  2. import sys
  3.  
  4. dice_list = [int(i) for i in sys.stdin.readline().split()]
  5. my_dict = {}
  6.  
  7. for i in dice_list:
  8. if i not in my_dict:
  9. my_dict[i] = 1
  10. else:
  11. my_dict[i] += 1
  12. # print(my_dict)
  13. price = 0
  14. for i in my_dict:
  15. # print(i)
  16. if my_dict[i] > 1:
  17. if my_dict[i] == 3:
  18. price = 10000 + (i * 1000)
  19. else:
  20. price = 1000 + (i * 100)
  21. break
  22. else:
  23. price = max(my_dict.keys()) * 100
  24. break
  25.  
  26. print(price)
Success #stdin #stdout 0.03s 9856KB
stdin
6 1 1
stdout
600