結果

問題 No.3099 夜の道路は気をつけて運転しなければならない
ユーザー cho435cho435
提出日時 2023-03-31 23:00:52
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 389 bytes
コンパイル時間 2,016 ms
コンパイル使用メモリ 201,528 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-24 09:26:37
合計ジャッジ時間 2,693 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 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,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for (int i=0;i<(int)(n);i++)

int main(){
  int t,s,d;
  cin>>t>>s>>d;
  double tm=double(d)/s;
  double ans=0;
  t+=24-6;
  t%=24;
  if(t>12){
    ans-=t-12;
  }
  tm+=t;
  while(tm>24){
    ans+=12;
    tm-=24;
  }
  if(tm>12){
    ans+=tm-12;
  }
  cout<<fixed<<setprecision(10);
  cout<<ans<<endl;
}
0