結果
| 問題 |
No.8099 夜の道路は気をつけて運転しなければならない
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-03-31 22:51:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 459 bytes |
| コンパイル時間 | 1,529 ms |
| コンパイル使用メモリ | 166,968 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-23 01:49:33 |
| 合計ジャッジ時間 | 2,147 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 2 WA * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
#define REP(i,n) for(int i=0;i<int(n);i++)
int main(void){
cin.tie(nullptr); ios_base::sync_with_stdio(false);
int i,j,k;
int T,S,D;
cin >> T >> S >> D;
int s=0;
for(i=1;i<=55;i++){
int a=24*i-6,b=24*i+6;
int d=min(b*S,T*S+D)-max(a*S,T*S);
if(d>=0) s+=d;
}
double ans=1.0*s/S;
cout << fixed << setprecision(15) << ans << endl;
return 0;
}