結果
問題 | No.1980 [Cherry 4th Tune D] 停止距離 |
ユーザー |
![]() |
提出日時 | 2022-06-17 21:57:07 |
言語 | C++11 (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,124 bytes |
コンパイル時間 | 1,067 ms |
コンパイル使用メモリ | 102,692 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-09 07:49:12 |
合計ジャッジ時間 | 17,771 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 WA * 24 |
ソースコード
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<sstream> #include<cstdio> #include<cstdlib> #include<cstring> #include<climits> #include<cmath> #include<string> #include<vector> #include<set> #include<map> #include<queue> #include<numeric> #include<functional> #include<algorithm> #include<bitset> #include<tuple> #include<unordered_set> #include<unordered_map> #include<random> #include<array> #include<cassert> #include<list> #include<fstream> using namespace std; #define INF ((1<<30)-1) #define rep(i,n) for(int i=0;i<(int)(n);i++) #define all(v) v.begin(),v.end() int main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; rep(_, n) { double a, b, c; cin >> a >> b >> c; double s = sqrt(a * a + 4 * c / 20 / b); double v = (-a + s) / 2 * 20 * b; //printf("%.2f\n", max(0.0, (v / 1000 * 3600) - 0.005)); auto str = to_string(max(0.0, (v / 1000 * 3600) - 0.000)); if (str.find('.') == string::npos) { str += ".00"; } int i; for (i = 0; str[i] != '.'; i++)cout << str[i]; cout << str[i++]; cout << str[i++]; cout << str[i++]; cout << endl; } return 0; }