結果

問題 No.1980 [Cherry 4th Tune D] 停止距離
ユーザー kuraraberu
提出日時 2022-06-17 21:54:15
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 1,051 bytes
コンパイル時間 1,765 ms
コンパイル使用メモリ 166,728 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-09 07:43:55
合計ジャッジ時間 20,768 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;

// aよりもbが大きいならばaをbで更新する
// (更新されたならばtrueを返す)
template <typename T>
bool chmax(T &a, const T& b) {
  if (a < b) {
    a = b;  // aをbで更新
    return true;
  }
  return false;
}
// aよりもbが小さいならばaをbで更新する
// (更新されたならばtrueを返す)
template <typename T>
bool chmin(T &a, const T& b) {
  if (a > b) {
    a = b;  // aをbで更新
    return true;
  }
  return false;
}

double V(double T,double u,double L){
    double s=0;
    s=-10*u*T+sqrt((10*u*T)*(10*u*T)+20*u*L);
    return s;
}

int main(){
    int N;
    cin>>N;
    for(int i=0;i<N;++i){
        double T,u,L;
        cin>>T>>u>>L;
        double ans=0;
        ans=V(T,u,L);
        ans*=60;
        ans*=60;
        ans/=1000;
        // printf("%.2f", ans);
        // printf("\n");

        cout<<fixed<< setprecision(2)<<floor(100 * (ans) ) / 100<<endl;
    }
}
0