Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count_models = int(input())
- rating = 0
- possible_sales = 0
- total_sales = 0
- all_rating = 0
- for number in range(1, count_models+1):
- current_num = int(input())
- rating = current_num % 10
- all_rating += rating
- possible_sales = current_num // 10
- if rating == 2:
- total_sales += 0
- elif rating == 3:
- total_sales += possible_sales * 0.50
- elif rating == 4:
- total_sales += possible_sales * 0.70
- elif rating == 5:
- total_sales += possible_sales * 0.85
- elif rating == 6:
- total_sales += possible_sales
- print(f"{total_sales:.2f}")
- print(f"{all_rating / count_models:.2f}")
Add Comment
Please, Sign In to add comment