結果

問題 No.105 arcの六角ボルト
ユーザー itezpaceitezpace
提出日時 2016-09-22 09:51:00
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 563 bytes
コンパイル時間 735 ms
コンパイル使用メモリ 68,304 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-04-28 17:22:27
合計ジャッジ時間 1,549 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>
#include <algorithm>
#include <string>
#include <iomanip>
using namespace std;
const double pie=3.14159265358979265358979;
int main(){
  int T;
  cin>>T;
  for(int i=0; i<T; ++i){
    double X1=0,Y1=0,X2=0,Y2=0;
    double XL=1;
    XL/=2;
    XL+=1e-9;
    for(int j=0; j<6; ++j){
      cin>>X1>>Y1;
      if(XL<X1){
        X2=X1;
        Y2=Y1;
      }
    }
    double t=Y2;
    t/=X2;
    double deg=atan(t);
    deg*=180;
    deg/=pie;
    if(deg<0) deg=0;
    cout<<fixed<<setprecision(9)<<deg<<endl;
  }
  return 0;
}
0