大佬求救,哪里有错啊/(ㄒoㄒ)/~~vs上跑挺好的呀
查看原帖
大佬求救,哪里有错啊/(ㄒoㄒ)/~~vs上跑挺好的呀
823309
zsy_NKU楼主2022/10/20 14:48
#include<iostream>
#include<cmath>
using namespace std;
int main(){
	int s,v,a,d,e;
	cin >> s >> v;
	a = 470-ceil(s / v);
	if (a < 0)
		a += 1440;
	d = a/ 60;
	e = a% 60;
	if (d < 10) {
		if (e <10)
			cout << "0" << d << ":0" << e;
		else
			cout << "0" << d << ":" << e;
	}
	else {
			if (e < 10)
				cout << d << ":0" << e;
			else
				cout << d << ":" << e;
	}
	


}
2022/10/20 14:48
加载中...