#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
scanf("%d", &n);
int x = 0, k = 0;
for (int i = 1; i <= 100; i++) {
int temp = n - 364 * i;
if (temp % 1092 != 0)
continue;
int num = round(((n - 364 * i) / 1092));
if (num > 0)
k = num, x = i;
}
printf("%d\n%d\n", x, k);
return 0;
}
P4956([COCI2017-2018#6] Davor)
最新推荐文章于 2024-04-04 19:35:15 发布