Files
python/TangDou/LuoGuBook/P4956.cpp

18 lines
375 B
C++
Raw Normal View History

2025-08-30 18:35:01 +08:00
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
for (int x = 100; x >= 1; x--)
for (int k = 1;; k++) {
int m = 52 * (7 * x + 21 * k);
if (m > n) break;
if (m == n) {
printf("%d\n%d\n", x, k);
exit(0);
}
}
return 0;
}