Files
python/GESP/资料/WuHouZiFenTao.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

22 lines
612 B
C++

#include <bits/stdc++.h>
// https://blog.csdn.net/weixin_43772810/article/details/121048802
// https://blog.csdn.net/weixin_43772810/article/details/121297946
using namespace std;
int main() {
int i = 0, j = 0;
int tmp = 0;
for (i = 1; i <= 10000; i++) {
tmp = i;
for (j = 0; j < 5; j++) {
if ((tmp - 1) % 5 != 0 || tmp <= 1)
break;
tmp = (tmp - 1) / 5 * 4;
}
if (j == 5) {
printf("there was %d peaches.\n", i);
exit(0);
}
}
printf("thats too more!");
return 0;
}