在n的值不同时c和H的规律

#include <stdio.h>
int c;
int H(int n, int a, int b) {
int rp;
++c;
if (n==0)
return b+1;
if(b==0)

if(n==1)
return a;
if (n==2)
return 0;
if(n>=3)
return 1;
};
rp=H(n, a, b-1);
return H(n-1, a, rp);

int main(){
int rp;
c=0;
rp=H(4,2, 3);
printf("*****H=%d\n", rp);
printf("c=%d\n",c);

return 0;


Check the two correct answers calculated one for H and one for c

Select one or more:
*****H=8
c=49
c=7
c=25
c=203
*****H=6
*****H=16
*****H=9
The correct answers are:*****H=16,c=203

各位大神,这道题的c和H有没有什么规律呢,例如n=1,c=2b-1,H=a+b。n的值太大的时候实在是很难算_(:зゝ∠)_
(考试题不让用codeblocks孩子要哭了)

你好,我是有问必答小助手,非常抱歉,本次您提出的有问必答问题,技术专家团超时未为您做出解答


本次提问扣除的有问必答次数,将会以问答VIP体验卡(1次有问必答机会、商城购买实体图书享受95折优惠)的形式为您补发到账户。


因为有问必答VIP体验卡有效期仅有1天,您在需要使用的时候【私信】联系我,我会为您补发。