7WA,求助
查看原帖
7WA,求助
1072108
linmaonan楼主2023/10/18 19:08
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int s,v,t;
	cin>>s>>v;
	if(s%v!=0) t = (s/v)+1;
	else t = s/v;
	t+=10;
	int h=0,m=0;
	if(t>=60)
	{
		h = t/60;
		m = t%60;
	}
	else 
	{
		m = t;
		//h = 8;
	}
	if(h>=8||(h==7&&m>0))
	{
		h-=8;
		h=24-h;
	}
	else h=8-h;
	if(m>0)
	{
		h--;
		m=60-m; 
	}
	//cout<<h<<":"<<m;
	printf("%02d:%02d",h,m);
	return 0;
}
2023/10/18 19:08
加载中...