题解
2023-08-20 21:01:25
发布于:广东
1阅读
0回复
0点赞
#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
int main() {
int M, S, T;
cin >> M >> S >> T;
int s1 = 0, s2 = 0;
for (int i = 1; i <= T; i++) {
s1 += 17;
if (M >= 10) {
s2 += 60;
M -= 10;
} else {
M += 4;
}
if (s2 > s1) {
s1 = s2;
}
if (s1 > S) {
cout << "Yes" << endl << i << endl;
return 0;
}
}
cout << "No" << endl << s1 << endl;
return 0;
}
这里空空如也
有帮助,赞一个