結果
| 問題 |
No.105 arcの六角ボルト
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-16 21:43:33 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 5,000 ms |
| コード長 | 757 bytes |
| コンパイル時間 | 2,339 ms |
| コンパイル使用メモリ | 157,760 KB |
| 実行使用メモリ | 6,816 KB |
| 最終ジャッジ日時 | 2024-06-12 05:06:41 |
| 合計ジャッジ時間 | 2,789 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
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;
}
}
}
}