結果
| 問題 | 
                            No.105 arcの六角ボルト
                             | 
                    
| コンテスト | |
| ユーザー | 
                             TLwiegehtt
                         | 
                    
| 提出日時 | 2015-07-16 10:58:52 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 21 ms / 5,000 ms | 
| コード長 | 524 bytes | 
| コンパイル時間 | 162 ms | 
| コンパイル使用メモリ | 24,192 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-07-08 08:10:31 | 
| 合計ジャッジ時間 | 548 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 1 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |         scanf("%d", &T);
      |         ^~~~~~~~~~~~~~~
main.c:18:25: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   18 |                         scanf("%lf %lf", &pX[i], &pY[i]);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#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;
}
            
            
            
        
            
TLwiegehtt