求助 只有50分
查看原帖
求助 只有50分
693467
jiangzhongrui楼主2024/10/27 17:27
#include<bits/stdc++.h>

using namespace std;

int main() {
	int s,v,time=7*60+50,HH,MM;
	int t;
	cin>>s>>v; 
	t=s/v;
	if(s%v!=0)
	{
		t=t+1;
	}
	if(t<time)
	{
		time=time-t;
	}
	else
	{
		time=24*60-(t-time);
	}
	HH=time/60;
	MM=time%60;
	if(HH>7)
	{
		HH=24-(HH-7);
		if(HH<10)
		{
			cout<<"0"<<HH<<":"<<MM;
		}
		else
		{
			cout<<HH<<":"<<MM;
		}
	}
	else
	{
		cout<<"0"<<HH<<":"<<MM;
	}
	
		
	
return 0;
}
2024/10/27 17:27
加载中...