結果

問題 No.350 d=vt
ユーザー @abcde@abcde
提出日時 2019-02-19 22:22:06
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 470 bytes
コンパイル時間 1,652 ms
コンパイル使用メモリ 143,764 KB
実行使用メモリ 4,512 KB
最終ジャッジ日時 2023-08-03 00:18:54
合計ジャッジ時間 2,195 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,384 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 WA -
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,384 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,384 KB
testcase_10 AC 1 ms
4,384 KB
testcase_11 AC 1 ms
4,384 KB
testcase_12 AC 1 ms
4,512 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 2 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

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