include<iostream>
using namespace std;
int cuo(int *flsh,int n){
int i, flag = 0;
flsh[0] = 1;
while (flag == 0){
flsh[0] = flsh[0] + 5;
for (i = 1; i < n; i++){
flsh[i] = (flsh[i - 1] - 1) / 5 * 4;
if (flsh[i] % 5 != 1) break;
}
if (i == n) flag = 1;
}
return flsh[0];
}
int main()
{
int flsh[5];
int n;
cout << "输入数" << endl;
cin >> n;
cout << "鱼的总数为" << endl;
cout<<cuo(flsh,n);
}
捕鱼知多少
最新推荐文章于 2024-11-04 17:55:03 发布