8 9 10 测点不过。用<iostream>。求救!!
查看原帖
8 9 10 测点不过。用<iostream>。求救!!
1643431
dyx130707楼主2025/1/19 20:49
#include <iostream>
#include <cmath>
using namespace std;
int main (){
	int s,u;
	cin >> s >> u;
	int sj  = (24*60+8*60)-(ceil((double)s/u))-10;
	int xs = sj / 60;
	int fz = sj % 60;
	if(xs >= 24){
		xs = xs - 24;
	}
	if((xs < 10) && (fz < 10)){
		cout << 0 << xs << ":" << 0 << fz; 
	}else if((xs < 10) && !(fz < 10)){
		cout << 0 << xs << ":" << fz; 
	}else if(!(xs < 10) && (fz < 10)){
		cout << xs << ":" << 0 << fz; 
	}
	
	return 0;
}
2025/1/19 20:49
加载中...