Submission

Status:

P-PPPPP-PP

Subtask/Task Score:

80/100

Score: 80

User: MrPian

Problemset: Tired To Walk

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-12 13:12:29

#include<iostream>
#include<cmath>
using namespace std;
int main(){
    double scale;
    float speed;
    int x1,y1,x2,y2;
    cin >> scale >> speed;
    cin >> x1 >> y1 >> x2 >> y2;
    int dist = pow(pow(x1+x2,2)+pow(y1+y2,2),0.5)*scale;
    float time = dist / (speed * (18.0/5));

    float min = (time - floor(time))*(3.0/5)*100;
    cout << floor(time) << " hr " << ceil(min) << " min ";
    return 0;
}