結果

問題 No.105 arcの六角ボルト
ユーザー nebukuro09nebukuro09
提出日時 2016-11-16 21:43:33
言語 D
(dmd 2.106.1)
結果
AC  
実行時間 30 ms / 5,000 ms
コード長 757 bytes
コンパイル時間 1,964 ms
コンパイル使用メモリ 156,240 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-09-02 22:55:44
合計ジャッジ時間 2,552 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import std.stdio;
import std.array;
import std.string;
import std.conv;
import std.algorithm;
import std.typecons;
import std.range;
import std.random;
import std.math;
import std.container;

void main() {
  real EPS = (10.0L)^^(-12);
  auto T = readln.chomp.to!int;

  foreach (t; 0..T) {
    readln();
    foreach (i; 0..6) {
      auto input = readln.split.map!(to!real);
      auto x = input[0];
      auto y = input[1];
      if (abs(1.0L - x) < EPS) {
        writeln("0.0000000");
        foreach (j; i+1..6)
          readln();
        break;
      }
      auto deg = atan2(y, x) * 180.0L / PI;
      if (-1.0L < deg && deg < 51.0L) {
        writefln("%.7f", deg);
        foreach (j; i+1..6)
          readln();
        break;
      }
    }
  }
}
0