SHARE
TWEET

Untitled

HarkTu May 19th, 2019 51 in 2 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. age = int(input())
  2. washer_machine = float(input())
  3. toy = int(input())
  4. odd = 0
  5. even = 0
  6. money = 0
  7. if age % 2 == 0:
  8.     odd = age / 2
  9.     even = odd
  10. else:
  11.     even = (age - 1) / 2
  12.     odd = even + 1
  13. money = even * (even + 1) / 2 * 10
  14. if washer_machine > money - even + toy * odd:
  15.     print(f'No! {washer_machine - (money - even + toy * odd):.2f}')
  16. else:
  17.     print(f'Yes! {(money - even + toy * odd) - washer_machine:.2f}')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top