結果

問題 No.105 arcの六角ボルト
ユーザー ぴろずぴろず
提出日時 2014-12-16 23:34:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,550 ms / 5,000 ms
コード長 562 bytes
コンパイル時間 2,236 ms
コンパイル使用メモリ 72,068 KB
実行使用メモリ 64,252 KB
最終ジャッジ日時 2023-09-02 15:27:49
合計ジャッジ時間 5,672 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

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

ソースコード

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