80pts求调
查看原帖
80pts求调
1019997
zhouzihao20110917楼主2023/11/3 18:28
#include <bits/stdc++.h>
using namespace std;
int a, b, sum = 0, ans = 8 * 60;

int main() {
	cin >> a >> b;
	if()
	if (a % b == 0) {
		sum += a / b;
	} else {
		sum += a / b + 1;
	}
	if (ans - sum < 0) {
		ans -= sum;
		ans += 1440;
		int s = ans / 60;
		int m = ans - s * 60 - 10 ;
		if (s < 10 && m < 10) {
			cout << "0" << s << ":" << "0" << m;
			return 0;
		}
		if (s < 10 && m > 10) {
			cout << "0" << s << ":" << m;
			return 0;
		}
		if (s > 10 && m < 10) {
			cout << s << ":" << "0" << m;
			return 0;
		} else {
			cout  << s << ":" << m;
		}
	} else {
		ans -= sum;
		int s = ans / 60;
		int m = ans - s * 60 - 10;
		if (s < 10 && m < 10) {
			cout << "0" << s << ":" << "0" << m;
			return 0;
		}
		if (s < 10 && m > 10) {
			cout << "0" << s << ":" << m;
			return 0;
		}
	}
	return 0;
}

2023/11/3 18:28
加载中...