Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- last_ticket = ''
- last_minutes = 10000
- last_price = 0
- while True:
- ticket_number = input()
- if ticket_number == 'End':
- break
- price = float(input())
- minutes_in = int(input())
- if minutes_in < last_minutes:
- last_ticket = ticket_number
- last_minutes = minutes_in
- last_price = price
- total_price = last_price * 1.96
- hours = last_minutes // 60
- minutes = last_minutes % 60
- print(f"Ticket found for flight {last_ticket} costs {total_price:.2f} leva with {hours}h {minutes}m stay")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement