time_10 @ 2024-11-02 16:12:54
当时凌晨迷迷糊糊写的,因为最后的检测点过不了一气之下将24改为了23结果就ac了,经检验,这个解其实不是完全解…… 代码如下
#include<bits/stdc++.h>
using namespace std;
int main()
{
double s,v,t;
cin >>s >>v;
int h,m;
t=s/v+10.0;
h=8-t/60;
if(t-double(int(t))!=0)
{m=60-int(t)%60-1;}
else
{m=60-int(t)%60;}
if(h<0)
{h=23+h;}
if(m==60)
{m=0;}
if(m<0)
{m=60+m;
h=h-1;}
if(h<10 and h>=0)
{cout <<"0";}
cout << h;
cout << ":";
if(m<10)
{cout <<"0";
}
cout << m << endl;
return 0;
}
~~说明我运气还挺好的嘛=v=
by wuyusheng @ 2024-11-02 16:34:01
6
by _wzm_ @ 2024-11-05 20:28:24
( ̄_, ̄ )