卡在了第九个测试点,求大佬帮忙
查看原帖
卡在了第九个测试点,求大佬帮忙
699714
JuneOrangeCat楼主2024/1/8 15:01
#include<iostream>
using namespace std;
int main(){
	int s,v,f,h;
	cin >> s>>v;
	h= (s/v+10)/60;
	f= (s/v+10) % 60;
	if((s/v+10)%60 == 0)f++;

	if(h == 0) cout << "07";
	else if (h < 8) cout << "0" << 7-h;
	else cout << 24+7 - h ;
	
	cout << ":";
	
	if(f>=50) cout << "0" << 59-f;
	else cout << 59-f;
	
	return 0 ;
}

2024/1/8 15:01
加载中...