Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Karatat007

Problemset: Tired To Walk

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-07 14:23:49

#include <bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    long double scale, speed, y1, x1, y2, x2;
    cin >> scale >> speed >> y1 >> x1 >> y2 >> x2;

    long double dx = x1 + x2, dy = y1 + y2;
    long double hours = scale * sqrtl(dx*dx + dy*dy) / (speed * 18.0L / 5.0L);

    long long m = (long long)ceill(hours * 60.0L - 1e-9L);
    cout << m / 60 << " hr " << m % 60 << " min\n";
}