結果
問題 |
No.8099 夜の道路は気をつけて運転しなければならない
|
ユーザー |
![]() |
提出日時 | 2023-03-31 22:16:47 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 677 bytes |
コンパイル時間 | 1,512 ms |
コンパイル使用メモリ | 167,956 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-23 01:00:39 |
合計ジャッジ時間 | 2,133 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 WA * 8 |
ソースコード
#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(fet >= 18 || fet < 6){ ans += ((T+D/S)-fet); } cout <<setprecision(10) << ans << endl; }