結果

問題 No.105 arcの六角ボルト
ユーザー 37zigen37zigen
提出日時 2016-05-20 12:06:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,438 ms / 5,000 ms
コード長 598 bytes
コンパイル時間 2,144 ms
コンパイル使用メモリ 74,024 KB
実行使用メモリ 52,112 KB
最終ジャッジ日時 2024-04-16 01:47:29
合計ジャッジ時間 5,723 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,438 ms
52,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;
import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		new Main().solve();
	}
	void solve(){
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();
		for(int time=0;time<t;time++){
			double[] x=new double[6];
			double[] y=new double[6];
			double x1=-1;
			double y1=100;
			for(int i=0;i<6;i++){
				x[i]=sc.nextDouble();
				y[i]=sc.nextDouble();
				double deg=Math.atan2(y[i], x[i])*180.0*(1/Math.PI);
				if((-5<deg&&deg<55)){
					y1=y[i];
					x1=x[i];
				}
			}
			System.out.println(180.0*Math.atan2(y1,x1)*(1/Math.PI));
		}
	}
}
0