結果

問題 No.3099 夜の道路は気をつけて運転しなければならない
ユーザー gyozasukisukigyozasukisuki
提出日時 2023-03-31 22:21:52
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 693 bytes
コンパイル時間 1,685 ms
コンパイル使用メモリ 167,360 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-24 08:27:30
合計ジャッジ時間 2,482 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,l,r) for(int i=(l); i<(r); i++)
#define INF ((1LL<<62)-(1LL<<31)) 
using namespace std;
using ll = long long;
using inv = vector<int>;
using stv = vector<string>;
using GraphI = vector<inv>;
using position = pair<int,int>;

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    double T,S,D; cin >> T >> S >> D;
    double endtime = T+D/S;
    double fet = floor(endtime);

    double ans = 0;
    for(int i=(int)T; i<(int)fet; i++){
        int d = i % 25;
        if(d >= 18 || d <= 6) ans += 1;
    }

    if((int)fet%25 >= 18 || (int)fet%25 < 6){
        ans += ((T+D/S)-fet);
    }

    cout <<setprecision(10) << ans << endl;



}
0