蒻苟求助 样例是对的 不知道错在哪里了
查看原帖
蒻苟求助 样例是对的 不知道错在哪里了
388923
Tuowu楼主2021/7/17 00:06

这是代码们:

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int s,v,hh;
	cin>>s>>v;
	float time=s/v;
	if(time-time/1!=0)	time=time/1+1;
	int mm=50-time-time/60,h=time/60;
	if(time>7)	hh=24-h+7;
	else	hh=7-h;
	if(hh/10==0)	cout<<"0"<<hh<<":";
	else cout<<hh<<":";
	if(mm/10==0)	cout<<"0"<<mm;
	else cout<<mm;
	return 0;
}
2021/7/17 00:06
加载中...