結果

問題 No.105 arcの六角ボルト
コンテスト
ユーザー ciel
提出日時 2014-12-16 23:43:54
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
実行時間 -
コード長 336 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 50 ms
コンパイル使用メモリ 29,696 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-07-23 20:41:53
合計ジャッジ時間 883 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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 ret=180*acosl(X)/pi;
		if(ret>55)ret-=60;
		printf("%.9Lf\n",ret);
	}
}
0