結果

問題 No.105 arcの六角ボルト
コンテスト
ユーザー ciel
提出日時 2014-12-16 23:49:46
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
(最新)
CE  
(最初)
実行時間 -
コード長 381 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 208 ms
コンパイル使用メモリ 29,764 KB
最終ジャッジ日時 2026-02-23 18:03:27
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:13: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         for(scanf("%d",&T);T--;){
      |             ^~~~~~~~~~~~~~
main.c:11:25: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |                         scanf("%Lf%Lf",&x,&y);
      |                         ^~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #
raw source code

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

int main(){
	const long double pi=acosl(-1);
	int T;
	for(scanf("%d",&T);T--;){
		long double X=0,Y=0,x,y;
		int i=0;
		for(;i<6;i++){
			scanf("%Lf%Lf",&x,&y);
			if(x>=0&&y>=0&&x>X)X=x,Y=y;
		}
		long double z=X/(X*X+Y*Y);
		if(z>1)z=1;
		long double ret=180*acosl(z)/pi;
		if(ret>55)ret-=60;
		printf("%.9Lf\n",ret);
	}
}
0