70求助,最后三个点错了
查看原帖
70求助,最后三个点错了
662382
Luogu_yuyi楼主2022/8/5 16:48
#include <bits/stdc++.h>
using namespace std;

int main()
{
	int s,t,h;
	cin>>s>>t;
	int n=480+24*60;
	if(s%t!=0)
	{
		h=s/t+11;
	}
	else
		h=s/t+10;
	if(h<=480)
		n=n-24*60-h;
	int HH,MM;
	MM=n%60;
	HH=n/60;
	if(HH<10)
	{
		cout<<"0"<<HH<<":";
	}
	else
	{
		cout<<HH<<":";
	}
	if(MM<10)
	{
		cout<<"0"<<MM;
	}
	else
		cout<<MM;
	return 0;
}
2022/8/5 16:48
加载中...