Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- am1ly_cost = input()
- planet_d = input().split(' ')
- total_am1ly_cost = 0
- for element in planet_d:
- travel_cost = (int(element) * int(am1ly_cost))
- total_am1ly_cost += travel_cost + 1
- # print(total_am1ly_cost)
- rem = total_am1ly_cost % 10
- if rem < 5:
- total_am1ly_cost = int(total_am1ly_cost / 10) * 10
- else:
- total_am1ly_cost = int((total_am1ly_cost + 10) / 10) * 10
- print(total_am1ly_cost)
Advertisement
Add Comment
Please, Sign In to add comment