結果
| 問題 |
No.105 arcの六角ボルト
|
| コンテスト | |
| ユーザー |
otsnsk
|
| 提出日時 | 2014-12-17 14:58:28 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 65 ms / 5,000 ms |
| コード長 | 727 bytes |
| コンパイル時間 | 690 ms |
| コンパイル使用メモリ | 66,784 KB |
| 実行使用メモリ | 6,812 KB |
| 最終ジャッジ日時 | 2024-06-12 01:00:02 |
| 合計ジャッジ時間 | 1,174 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
/*
No.105 arcの六角ボルト - yukicoder http://yukicoder.me/problems/198
*/
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
const double EPS = 1e-12;
const double PI = 3.141592653589793238463;
int main() {
int T;
double x[6], y[6];
double t50 = PI * 50 / 180, t;
cin >> T;
while (T--) {
for (int i = 0; i < 6; ++i) {
cin >> x[i] >> y[i];
}
for (int i = 0; i < 6; ++i) {
t = atan2(y[i], x[i]);
if (-EPS <= t && t < t50) {
break;
}
}
cout << fixed << setprecision(7)
<< (abs(t) * 180 / PI) << endl;
}
return 0;
}
otsnsk