黑子题解
2023-11-18 20:59:20
发布于:广东
2阅读
0回复
0点赞
#include<bits/stdc++.h>
#define ikun int
using namespace std;
ikun kunin()
{
ikun kunkun;
cin>>kunkun;
return kunkun;
}
ikun kun(ikun n)
{
if(n==1||n==2) return n;
else if(n%2==1) return kun(n-1);
else if(n%2==0) return kun(n/2)+kun(n-2);
}
void kunout(ikun basketball)
{
cout<<kun(basketball);
}
int main()
{
int basketball=kunin();
kunout(basketball);
}
这里空空如也
有帮助,赞一个