結果

問題 No.105 arcの六角ボルト
ユーザー ぴろず
提出日時 2014-12-16 23:34:21
言語 Java
(openjdk 23)
結果
AC  
実行時間 1,415 ms / 5,000 ms
コード長 562 bytes
コンパイル時間 2,541 ms
コンパイル使用メモリ 74,232 KB
実行使用メモリ 64,188 KB
最終ジャッジ日時 2024-06-11 22:01:01
合計ジャッジ時間 5,748 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

package no105;

import java.util.Scanner;

public class Main {
	public static double EPS = 1E-8;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		for(int tt=0;tt<t;tt++) {
			double arg = 100;
			for(int i=0;i<6;i++) {
				double x = sc.nextDouble();
				double y = sc.nextDouble();
				double atan = Math.atan2(y, x);
				if (atan >= -EPS) {
					arg = Math.min(arg, atan);
				}
			}
			if (arg <= EPS) {
				arg = 0;
			}
			System.out.println(Math.toDegrees(arg));
		}
	}
}
0