結果

問題 No.105 arcの六角ボルト
ユーザー satanicsatanic
提出日時 2016-04-23 14:43:12
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 34 ms / 5,000 ms
コード長 607 bytes
コンパイル時間 549 ms
コンパイル使用メモリ 65,348 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-07-27 17:08:03
合計ジャッジ時間 1,153 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <cmath>
#include <iomanip>

int main(){
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    
    int t;
    std::cin >> t;
    for(int i=0; i<t; ++i){
        bool foundedF = false;
        for(int j=0; j<6; ++j){
            double x, y;
            std::cin >> x >> y;
            y+=1/1e12;
            if(!foundedF && x>0 && y>0 && y<x*std::sqrt(3)){
                std::cout << std::fixed << std::setprecision(7) << std::fmod(std::round(std::atan(y/x)*180*1e7/M_PI)/1e7, 60) << "\n";
                foundedF=true;
            }
        }
    }

    return 0;
}
0