problem:-
Alice has the following two types of taxis:
You are going to the office from your home. Your task is to minimize the cost that you are required to pay. The distance from your home to the office is D. You are required to select whether you want to use online or classic taxis to go to your office. If both the taxis cost the same, then you must use an online taxi.
Input format
If you select an online taxi to travel, then print a string 'Online Taxi'. Otherwise, select 'Classic Taxi'. You can print this string in a new, single line.
Constraints
1 109
- Online taxi: It can be booked by using an online application from phones
- Classic taxi: It can be booked anywhere on the road
You are going to the office from your home. Your task is to minimize the cost that you are required to pay. The distance from your home to the office is D. You are required to select whether you want to use online or classic taxis to go to your office. If both the taxis cost the same, then you must use an online taxi.
Input format
- First line: Single integer that denotes the distance from your house to the office
- Next line: Three integers , , and
- Next line: Four integers , , , and
If you select an online taxi to travel, then print a string 'Online Taxi'. Otherwise, select 'Classic Taxi'. You can print this string in a new, single line.
Constraints
1 109
Explanation
If Felix choose to use Online Taxi, it will cost Felix a total of
While the classic taxi will cost Felix a total of
Therefore Felix will choose Online Taxi over Classic Taxi
While the classic taxi will cost Felix a total of
Therefore Felix will choose Online Taxi over Classic Taxi
Time Limit:1.0 sec(s) for each input file.
Memory Limit:64 MB
Source Limit:1024 KB
0 Comments