Advertisement
BbJLeB

05. Project Prize

May 30th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. # 05. Project Prize
  2.  
  3. parts_project = int(input())
  4. money_parts = float(input())
  5. points = 0
  6. moment_points = 0
  7.  
  8. for i in range(parts_project):
  9.     current_points = int(input())
  10.     points += 1
  11.     if points %2 == 0:
  12.         moment_points += current_points * 2
  13.     else:
  14.         moment_points += current_points
  15. end_prize = moment_points * money_parts
  16. print(f"The project prize was {end_prize:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement