Welcome

>>>Welcome to my "CODE BAZAR"
Code marshal
URI online judge
Others
Code marshal
URI online judge
Others
Code marshal
URI online judge
Others

Update ✔✔✔ Upcoming programming book (.pdf) "Programming Contest (data structures and algorithms) by Md. Mahbub Hasan & "Graph Algorithms" by Safayat Asraf "****** Date: 20 March, 2019****Hazrat Ali****

Thursday, 10 November 2016

URI-1016

URI Online Judge | 1016

Distance

Adapted by Neilor Tonin, URI  Brazil
Timelimit: 1
Problem link Click here
Two cars (X and Y) leave in the same direction. The car X leaves with a constant speed of 60 km/h and the car Y leaves with a constant speed of 90 km / h.
In one hour (60 minutes) the car Y can get a distance of 30 kilometers from the X car, in other words, it can get away one kilometer for each 2 minutes.
Read the distance (in km) and calculate how long it takes (in minutes) for the car Y to take this distance in relation to the other car.

Input

The input file contains 1 integer value.

Output

Print the necessary time followed by the message " minutos" that means minutes in Portuguese.
Input SampleOutput Sample
3060 minutos
110220 minutos
714 minutos

Solution....

#include<stdio.h>
int main()
{
    int x;
    scanf("%d",&x);
    printf("%d minutos\n",x*2);
 
    return 0;
}

No comments:

Post a Comment