# | Problem | Pass Rate (passed user / total user) |
---|---|---|
14656 | Cowboys and Horses |
|
14665 | Sky Diving |
|
Description
In a ranch, there are horses and cowboys, since every creature in the ranch are normal, a horse would have 4 legs and 1 tail, a cowboy would have 2 legs and no tail.
Now, given the total number of legs and tails in the ranch, try to calculate how many horses and cowboys are in the ranch.
Input
The number of legs n and the number of tails m.
2 ≤ n,m ≤ 1000
Output
Output 2 intergers in one line, the first being the number of cowboys, the other being the number of horses.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Everyone who jumped out of a plane knows that you should open your parachute when the altitude is at about 5500 ft.
David is new here and wonder how many seconds he can freefall before opening the parachute, so please help him calculate it.
hint: the equation for Linear Uniform Acceleration
[2025/09/04T00:30:00] Both testcases and sampleIO are now fixed for correct equation and decimal handling.
Input
The first line contains 3 interger h, v and a.
5500 ≤ h ≤ 15000 (ft), stands for how height he jumps out.
12 ≤ v ≤ 20 (ft/s), stands for the speed he jumps out.
24 ≤ a ≤ 40 (ft/s2), stands for the speed he accelerates.
Output
How many seconds later should he open his parachute. (drop the decimal points and leave only the integer part)