結果

問題 No.105 arcの六角ボルト
ユーザー kusagame12kusagame12
提出日時 2024-03-04 15:38:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,451 ms / 5,000 ms
コード長 1,231 bytes
コンパイル時間 7,164 ms
コンパイル使用メモリ 73,808 KB
実行使用メモリ 67,388 KB
最終ジャッジ日時 2024-03-04 15:38:16
合計ジャッジ時間 9,890 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
       
        Scanner sc = new Scanner(System.in);
        
        int T = sc.nextInt();
        
        for(int i = 0 ; i < T ; i++){
            
            double misalignment_x = 0.0;
            double misalignment_y = 0.0;
            
            for(int j = 0 ; j < 6 ; j++){
                
                double x = sc.nextDouble();
                double y = sc.nextDouble();
                
                if(x >= 0.6 && (y <= 0.8 && y >= 0)){
                    misalignment_x = x;
                    misalignment_y = y;
                }
                 
            }
            
            double distanc_x = misalignment_x;
            double distanc_y = misalignment_y;
            
            double misalignment_angle = Math.atan2(distanc_y , distanc_x) * (180 / Math.PI);
            
            //double test_x = 0.9636066231574117;
           // double test_y = 0.2673242895944358;
            
            //double misalignment_angle = Math.atan2(test_y , test_x) * (180 / Math.PI);
            
            System.out.println(misalignment_angle);
            
        }
        
    }
}
0