posts - 2,comments - 1,trackbacks - 0
import java.util.*;
import java.text.
*;
public class Main{

    
public static void main(String [] args)
    {
        final 
double eps = 1e-10;
        final 
double g = 9.8;
        Scanner cin 
= new Scanner ( System.in );
        
int test = cin.nextInt();
        
double x , y , v , delt , t ;
        DecimalFormat ctrl 
= new DecimalFormat ( "0.000000");
        
while ( test > 0 )
        {
            test 
-- ;
            x 
= cin.nextDouble();
            y 
= cin.nextDouble();
            v 
= cin.nextDouble();
            t 
= g * x */ ( v * v );
            delt 
= x * x - t * ( t + 2 * y );
            
if ( delt > - eps )
            {
                
double rel = (Math.atan((x-Math.sqrt( delt ))/t));
                System.
out.println(ctrl.format(rel));
            }
            
else
            {
                System.
out.println("-1");
            }
        }
    }
}

posted on 2009-08-18 19:31 Huicpc217 阅读(128) 评论(0)  编辑 收藏 引用 所属分类: JAVA

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理