摘要: #include<iostream> using namespace std; int main() { int n,i; while(cin>>n){ printf("%d=",n); for(i=2;i<=n;i++) while(n!=i) { if(n%i==0) { printf("%d* 阅读全文
posted @ 2019-03-19 21:46 Hello_World2020 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 数组求和 //求和库函数 #include<iostream> #include<numeric> #include<vector> using namespace std; int main() { int arr[]={1,2,3,4,5}; vector<int> v(arr,arr+5); 阅读全文
posted @ 2019-03-19 21:21 Hello_World2020 阅读(156) 评论(0) 推荐(0) 编辑
摘要: f(x)=4*f(x-1)+1 1=<x<=100 十位数字后溢出 有效9.63位 19位数字后溢出 有效18 (9.63*2) 分析:得使用大数处理,与大整数乘法类似 //计算 N! 30 #include<iostream> #include<cstring> using namespace s 阅读全文
posted @ 2019-03-19 15:32 Hello_World2020 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 第一个代码:(正确%50) //不计算简单做标记 #include<iostream> #include<cstring> using namespace std; const int maxn=1000010; int book[maxn]; int m,n; void gcd(int x){ i 阅读全文
posted @ 2019-03-19 11:13 Hello_World2020 阅读(192) 评论(0) 推荐(0) 编辑