結果
問題 | No.450 ベー君のシャトルラン |
ユーザー |
![]() |
提出日時 | 2016-12-01 15:52:04 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 452 bytes |
コンパイル時間 | 3,161 ms |
コンパイル使用メモリ | 156,328 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-27 15:49:09 |
合計ジャッジ時間 | 2,891 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:14:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 14 | scanf("%lf%lf%lf%lf",&VL,&VR,&D,&W); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h> using namespace std; #define FOR(i,l,r) for(int i = (l);i < (r);i++) #define ALL(x) (x).begin(),(x).end() template<typename T> bool chmax(T& a,const T& b){return a < b ? (a = b,true) : false;} template<typename T> bool chmin(T& a,const T& b){return b < a ? (a = b,true) : false;} typedef long long ll; double VL,VR,D,W; int main() { scanf("%lf%lf%lf%lf",&VL,&VR,&D,&W); printf("%.10f\n",D / (VL + VR) * W); return 0; }