'commit'
This commit is contained in:
18
TangDou/LuoGuBook/P4956.cpp
Normal file
18
TangDou/LuoGuBook/P4956.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user