結果

問題 No.105 arcの六角ボルト
ユーザー TLwiegehttTLwiegehtt
提出日時 2015-07-16 10:58:52
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 27 ms / 5,000 ms
コード長 524 bytes
コンパイル時間 121 ms
コンパイル使用メモリ 26,340 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-09-22 16:41:13
合計ジャッジ時間 688 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <math.h>
#include <string.h>
#include <stdio.h>

#define PI	(3.141592653589)

int main(void){
	int i,T;
	
	scanf("%d", &T);
	
	for(;T>0;T--){
		double pX[6], pY[6];
		
		double cAngle = atan2(0,1)*180/PI;
		
		for(i=0;i<6;i++){
			scanf("%lf %lf", &pX[i], &pY[i]);
		}
		
		for(i=0;i<6;i++){
			double x=pX[i], y=pY[i];
			double tmp;
			tmp = (atan2(y,x)*180/PI);
			if(tmp < 0){
				tmp += 360.0;
			}
			if(tmp-cAngle <= 55.0){
				cAngle = tmp - cAngle;
			}
		}
		
		printf("%0.15f\n", cAngle);
	}
	return 0;
}
0