C语言递归函数fun(m)解析:求解特定条件的n值
#include<stdio.h>\nint fun(int m)\n{\n\t if(m==1) return 0;\n\t else \n\t {\n\t\t int n = fun(m-1)+m*(m+1);\n\t\t if(fun(n)>m)\n\t\t\t return n-1;\n\t\t if(fun(n)==m)\n\t\t\t return n;\n\t }\n}
原文地址: https://www.cveoy.top/t/topic/p5K4 著作权归作者所有。请勿转载和采集!