山东网站,海外免费域名,网站建设需要的流程,建设工程安全管理网站思路#xff1a;在新类中使用全局变量进行运算#xff0c;在主类中定义新类数组#xff0c;通过构造函数的调用次数返回阶乘
#include type_traits
class add{public:static int count;static int tmp;add(){countcounttmp;tmp;}
};
int add::count0;
int add::t…
思路在新类中使用全局变量进行运算在主类中定义新类数组通过构造函数的调用次数返回阶乘
#include type_traits
class add{public:static int count;static int tmp;add(){countcounttmp;tmp;}
};
int add::count0;
int add::tmp1;
class Solution {
public:int Sum_Solution(int n) {add a[n];return add::count;}
};