c++求助,90分,第九个点没过
查看原帖
c++求助,90分,第九个点没过
1028452
Yemengying楼主2023/8/4 10:43
#include<bits/stdc++.h>
using namespace std;
int main(){
	int x,y,h=7,m=50;
	cin>>x>>y;
	m=m-(x/y)-1;
	if(m<0){
		while(m<0){
			h--;
			m+=60;
		}
	}
	while(h<0) h+=24;
	if(h<10) cout<<"0";
	cout<<h<<":";
	if(m<10) cout<<"0";
	cout<<m;
	return 0;
}
2023/8/4 10:43
加载中...