F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

NPY and shot

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1500    Accepted Submission(s): 682


Problem Description
NPY is going to have a PE test.One of the test subjects is throwing the shot.The height of NPY is H meters.He can throw the shot at the speed of v0 m/s and at the height of exactly H meters.He wonders if he throws the shot at the best angle,how far can he throw ?(The acceleration of gravity, g, is $9.8m/s^2$)
 

Input
The first line contains a integer $T(T \leq 10000)$,which indicates the number of test cases.
The next T lines,each contains 2 integers $H(0 \leq h \leq 10000m)$,which means the height of NPY,and $v_0(0 \leq v_0 \leq 10000m/s)$, which means the initial velocity.
 

Output
For each query,print a real number X that was rounded to 2 digits after decimal point in a separate line.X indicates the farthest distance he can throw.
 

Sample Input
2 0 1 1 2
 

Sample Output
0.10 0.99
 

Hint
If the height of NPY is 0,and he throws the shot at the 45กใ angle, he can throw farthest.
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-20 02:47:35, Gzip enabled