結果
| 問題 |
No.105 arcの六角ボルト
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2014-12-16 23:56:58 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 27 ms / 5,000 ms |
| コード長 | 405 bytes |
| コンパイル時間 | 824 ms |
| コンパイル使用メモリ | 25,216 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-06-26 03:09:08 |
| 合計ジャッジ時間 | 747 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 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);
| ^~~~~~~~~~~~~~~~~~~~~
ソースコード
#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/sqrtl(X*X+Y*Y);
if(z>1)z=1;
long double ret=180*acosl(z)/pi;
if(ret>55)ret-=60;
if(ret<0)ret=0;
printf("%.9Lf\n",ret);
}
}