You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#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;
|
|
} |