Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Taxi_amount = int ( input ( "N taxi: " ) )
- Taxi = []
- for i in range ( 0, Taxi_amount ):
- Taxi.append ( int ( input ( "Insert city: ") ) )
- TaxiBest = Taxi [ 0 ]
- Prezzo = Taxi [ 0 ]
- for i in range ( 1, len ( Taxi ) ):
- # TaxiBest = minimo tra ( TaxiBest + 1 ) VS ( T [ i ] )
- if ( ( TaxiBest + 1 ) < Taxi [ i ] ):
- TaxiBest = TaxiBest + 1
- else:
- TaxiBest = Taxi [ i ]
- Prezzo = Prezzo + TaxiBest
- print ( Prezzo )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement