結果

問題 No.8099 夜の道路は気をつけて運転しなければならない
ユーザー k82b
提出日時 2023-06-17 03:27:37
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 267 bytes
コンパイル時間 1,811 ms
コンパイル使用メモリ 194,016 KB
最終ジャッジ日時 2025-02-14 22:00:38
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 10 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(){
	int T,S,D;cin>>T>>S>>D;
	double ans=0;
	while(D>0){
		D-=S;
		if(D<0){
			ans+=(double)(D+S)/S;
			break;
		}
		ans+=(18<=T&&T<=23)|(0<=T&&T<=6);
		T=(T+1)%24;
	}
	cout<<fixed<<setprecision(15)<<ans<<endl;
}
0