30分WA求调
查看原帖
30分WA求调
665493
Coder12823楼主2024/3/10 09:35
#include <bits/stdc++.h>
using namespace std;

int main() {
	int s, v;
	scanf("%d%d", &s, &v);
	int time;
	if (s % v == 0) {
		time = s / v;
	} else {
		time = s / v + 1;
	}
	int h = 7, m = 50;
	for (int i = 0; i < time; i++) {
		if (m == 0) {
			h--;
			m = 60;
		} else {
			m--;
		}
	}
	if (h < 0) {
		h = 24 + h;
	}
	printf("%02d:%02d\n", h, m);

	return 0;
}

2024/3/10 09:35
加载中...