Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ages_lilly = int(input())
- price_washingmashine = float(input())
- one_toys_price = int(input())
- money_for_presenet_lily = 0 #парите за всеки Ч РД
- present_Lily_toys = 0
- total_money = 0
- for currenet_years in range (1, ages_lilly + 1):
- if currenet_years % 2 != 0:
- present_Lily_toys += 1
- else:
- money_for_presenet_lily += 10
- #brother_help -= 1
- total_money += money_for_presenet_lily - 1
- #sum_sold_toys = present_Lily_toys * one_toys_price
- #Savings_lily = money_for_presenet_lily + sum_sold_toys
- total_money += present_Lily_toys * one_toys_price
- #print(sum_sold_toys)
- #print(Savings_lily)
- diff = abs(total_money - price_washingmashine)
- if total_money >= price_washingmashine:
- print(f"Yes! {diff:.2f}")
- else:
- print(f"No! {diff:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment