Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: monpluk

Problemset: Tired To Walk

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-06 21:03:26

#include <iostream>
#include <cmath>
using namespace std;

int main(){
    double scale,speed,y1,x1,y2,x2,distance,time;
    int hr,min;
    cin >> scale >> speed >> y1 >> x1 >> y2 >> x2;
    distance = scale*sqrt(pow(x1+x2,2.0)+pow(y1+y2,2.0));
    time = distance/(speed*3.6);
    hr = floor(time);
    min = ceil((time-hr)*60);
    cout << hr << " hr " << min << " min";
}