最少乘法次數

#include<stdio.h> int fun(int n) {     int s;     if (n==1)         return 0;     if (n==2)         return 1;     if (n%2!=0)         s = fun(n-1) + 1;     else         s = fun(n/2) + 1;     return s;
相關文章
相關標籤/搜索