#P16466. [GKS 2013 Practice] Captain Hammer

    ID: 16451 Type: RemoteJudge 1000ms 1024MiB Tried: 0 Accepted: 0 Difficulty: 3 Uploaded By: Tags>数学2013Special JudgeGoogle Kick Start

[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 θ\theta degrees up and a speed of VV meters per second. VV 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 DD meters away. Your job is to program the Hamjet's computer to calculate θ\theta given VV and DD.

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 9.8 m/s29.8 \text{ m/s}^2 down.

输入格式

The first line of the input gives the number of test cases, TT. TT lines follow. Each line will contain two positive integers -- VV and DD.

输出格式

For each test case, output one line containing "Case #x: θ\theta", where x is the case number (starting from 1) and θ\theta 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 10610^{-6} 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

1T45001 \le T \le 4500;

1V3001 \le V \le 300;

1D100001 \le D \le 10000;

It is guaranteed that each test case will be solvable.