URI Online Judge | 1016 Distance (Solution)

Problem Link:
https://www.urionlinejudge.com.br/judge/en/problems/view/1016

URI Online Judge | 1016

Distance

Adapted by Neilor Tonin, URI  Brazil
Timelimit: 1
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. Read the distance (in km) and calculate how long it takes (in minutes) for the car Y to reach this distance in relation to the other car.

Input

The input file contain 1 integer number.

Output

Print the necessary time followed by the message " minutos" that means minutes in portuguese.
Sample InputSample Output
3060 minutos
110220 minutos
714 minutos
Solution:
#include <stdio.h>
  
int main() {
  
int n;
 scanf("%d", &n);
 printf("%d minutos\n", 150 / 60 * n);
  
    return 0;
}

Comments

  1. #include

    int main()

    {

    int n;

    scanf("%d", &n);

    printf("%d minutos\n",n*2);

    return 0;

    }

    ReplyDelete
  2. #include
    #include
    int main()
    {
    int x;
    scanf("%d",&x);
    int a=x*2;
    printf("%d minutos",a);
    return 0;
    }


    ReplyDelete

Post a Comment

Popular posts from this blog

URI Online Judge | 1036 Bhaskara's Formula (Solution)

URI Online Judge | 1043 Triangle (Solution)

URI Online Judge | 1042 Simple Sort (Solution)