parent
35cf216753
commit
563cf0b306
@ -1,20 +0,0 @@
|
||||
#include <bits/stdc++.h>
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
// 倒推
|
||||
int x; // 目前计算出的原来桃子的总数量
|
||||
int i = 0;
|
||||
int j = 1; // 最后一个猴子分得的桃子数量为4的j倍
|
||||
while (i < 5) {
|
||||
x = 4 * j;
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (x % 4 != 0) { break; }
|
||||
x = (x / 4) * 5 + 1;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
printf("%d\n", x);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in new issue