結果

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

ソースコード

diff #
raw source code

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

int main(){
	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;
		}
		printf("%.9Lf\n",180*acosl(X)/acosl(-1));
	}
}
0