GeorgeDI

Test1

May 25th, 2022
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. am1ly_cost = input()
  2. planet_d = input().split(' ')
  3. total_am1ly_cost = 0
  4.  
  5. for element in planet_d:
  6. travel_cost = (int(element) * int(am1ly_cost))
  7. total_am1ly_cost += travel_cost + 1
  8. # print(total_am1ly_cost)
  9.  
  10. rem = total_am1ly_cost % 10
  11. if rem < 5:
  12. total_am1ly_cost = int(total_am1ly_cost / 10) * 10
  13. else:
  14. total_am1ly_cost = int((total_am1ly_cost + 10) / 10) * 10
  15.  
  16. print(total_am1ly_cost)
Advertisement
Add Comment
Please, Sign In to add comment