C++80分蒟蒻求救T-T
查看原帖
C++80分蒟蒻求救T-T
578074
GlenBzc楼主2021/11/7 19:48
#include<iostream>

#include

using namespace std;

int main()

{

double s,v;int t=0,h,m;

cin>>s>>v;
t=ceil(s/v);
t+=10;
h=t/60;
m=t%60;
if(t<=480&&m!=0)
{
	cout<<"0"<<8-h-1<<":"<<60-m;
}
else if(t<=480&&m==0)
{
	cout<<"0"<<8-h<<":"<<"0"<<"0";
}
else if(t>=480&&m!=0)
{
	cout<<23-(h-8)<<":"<<60-m;
}
else if(t>480&&m==0)
{
	cout<<24-(h-8)<<":"<<"00";
}
return 0;

}

2021/11/7 19:48
加载中...