結果

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

テストケース

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

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
 
const double pi = acos(-1);
const double upper = 55 * pi / 180;
const double lower = -5 * pi / 180;
 
int main(){
	int T;
	cin >> T;
 
	for(int i=0;i<T;i++){
		double res = 0;
		for(int j=0;j<6;j++){
			double x, y;
			cin >> x >> y;
 
			double theta = atan2(y, x);
			if(lower < theta && theta < upper){
				res = theta;
			}
		}
		printf("%.15f\n", res * 180 / pi);
	}
 
	return 0;
}
0