让a相加b次就行了
int mutiply(int A, int B){ if(A==0||B==0){ return 0; } if(A==1)return B; if(B==1)return A; return A>B?A+mutiply(A, B-1):B+mutiply(A-1,B); }