結果

問題 No.105 arcの六角ボルト
コンテスト
ユーザー 37zigen
提出日時 2016-05-20 12:06:34
言語 Java
(openjdk 27.0.1.0.3 + ACL)
コンパイル:
javac -J-Duser.language=en -encoding UTF8 -cp /opt/aclib/ac_library.jar _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true -cp .:/opt/aclib/ac_library.jar _class_
結果
AC  
実行時間 933 ms / 5,000 ms
+ 848µs
コード長 598 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,801 ms
コンパイル使用メモリ 92,420 KB
実行使用メモリ 68,908 KB
最終ジャッジ日時 2026-10-29 05:36:39
合計ジャッジ時間 4,096 ms
ジャッジサーバーID
(参考情報)
judge5_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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