Ուղարկել | Բոլոր լուծումները | Լավագույն լուծումները | Վերադառնալ ցուցակին |
ACM0305 - HORSE RACE |
Mamane regularly organizes horse race. But he needs your help to test the effectiveness of his chronometer.
Given the length L of the race circuit into meter and average speed of the horse V into meters per second (m/s), your task is to write a program that will determine the time it takes the horse in hours, minutes and seconds, in format HH:MM:SS where HH is a two-digit number representing the number of hours ; MM (MM < 60) , a two-digit number representing the number of minutes, and SS (SS < 60), a two-digit number representing the number of seconds. SS and MM must each have the greatest possible value. In this problem, L and V are integers and HH will be strictly lower than 24.
Input.
The first line of input contains a single integer P, (1 ≤ P ≤ 1000), which is the number of data sets that follow. Each data set consists of one line containing the length L, the space and the average speed V of the horse.
Output.
For each data set, generate one line of output containing the time in format HH:MM:SS.
Sample test.
N |
stdin |
stdout |
1 |
4 1000 25 20 30 10000 55 390200 20 |
00:00:40 00:00:00 00:03:01 05:25:10 |
Ավելացրեց. | Հրանտ Հովհաննիսյան |
Ամսաթիվ. | 2016-07-23 |
Ժամանակի սահմանափակումը. | 1s |
Ծրագրի տեքստի սահմանափակումը. | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Լեզուներ. | Բոլորը բացի ASM32 ASM64 GAWK CLPS CLOJURE D ERL FSHARP FORTRAN GOSU HASK ICON ICK NEM NIM OBJC-CLANG PICO PIKE PYPY PYPY3 PY_NBC RUST SCM guile CHICKEN SED TCL WHITESPACE |
Աղբյուրը. | Nigerien Collegiate Programming Contest, 2016 |