#P16466. [GKS 2013 Practice] Captain Hammer
[GKS 2013 Practice] Captain Hammer
题目描述
The Hamjet is a true marvel of aircraft engineering. It is a jet airplane with a single engine so powerful that it burns all of its fuel instantly during takeoff. The Hamjet doesn't have any wings because who needs them when the fuselage is made of a special Wonderflonium isotope that makes it impervious to harm.
Piloting the Hamjet is a not a job for your typical, meek-bodied superhero. That's why the Hamjet belongs to Captain Hammer, who is himself impervious to harm. The G-forces that the pilot endures when taking a trip in the Hamjet are legen-dary.
The Hamjet takes off at an angle of degrees up and a speed of meters per second. is a fixed value that is determined by the awesome power of the Hamjet engine and the capacity of its fuel tank. The destination is meters away. Your job is to program the Hamjet's computer to calculate given and .
Fortunately, the Hamjet's Wondeflonium hull is impervious to air friction. Even more fortunately, the Hamjet doesn't fly too far or too high, so you can assume that the Earth is flat, and that the acceleration due to gravity is a constant down.
输入格式
The first line of the input gives the number of test cases, . lines follow. Each line will contain two positive integers -- and .
输出格式
For each test case, output one line containing "Case #x: ", where x is the case number (starting from 1) and is in degrees up from the the horizontal. If there are several possible answers, output the smallest positive one.
An answer will be considered correct if it is within of the exact answer, in absolute or relative error.
3
98 980
98 490
299 1234
Case #1: 45.0000000
Case #2: 15.0000000
Case #3: 3.8870928
提示
Limits
;
;
;
It is guaranteed that each test case will be solvable.