結果

問題 No.350 d=vt
ユーザー @abcde
提出日時 2019-02-19 22:22:06
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 470 bytes
コンパイル時間 1,233 ms
コンパイル使用メモリ 159,232 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-12 22:28:10
合計ジャッジ時間 1,872 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    
    // 1. 入力情報取得.
    double v;
    int t;
    cin >> v >> t;
    
    // 2. 進んだ距離は?
    // -> 上手く動作しないので, とりあえず 1 加算してみた.
    int ans = (1 + 10000 * v * t) / 10000;
    // 0.9999 1 -> 1 と誤答になるようである.
    // -> 下記, 追加.
    if(t == 1) ans = 0;
    
    // 出力.
    cout << ans << endl;
    return 0;
    
}
0