結果

問題 No.105 arcの六角ボルト
ユーザー otsnskotsnsk
提出日時 2014-12-17 14:58:28
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 70 ms / 5,000 ms
コード長 727 bytes
コンパイル時間 1,439 ms
コンパイル使用メモリ 65,724 KB
実行使用メモリ 4,368 KB
最終ジャッジ日時 2023-09-02 18:32:44
合計ジャッジ時間 1,202 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

/*
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;
}
0