結果

問題 No.105 arcの六角ボルト
ユーザー takeya_okinotakeya_okino
提出日時 2019-09-02 19:02:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,662 ms / 5,000 ms
コード長 557 bytes
コンパイル時間 2,455 ms
コンパイル使用メモリ 71,756 KB
実行使用メモリ 64,348 KB
最終ジャッジ日時 2023-08-22 12:16:47
合計ジャッジ時間 6,778 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int t = sc.nextInt();
    for(int i = 0; i < t; i++) {
      double x0 = 0;
      double y0 = 0;
      for(int j = 0; j < 6; j++) {
        double x = sc.nextDouble();
        double y = sc.nextDouble();
        if((x <= 1) && (x > (1 / 2)) && (y >= 0)) {
          x0 = x;
          y0 = y;
        }
      }
      double p = Math.toDegrees(Math.asin(y0));
      while(p >= 50) p -= 60;
      System.out.println(p);
    }
  }
}
0