- 博客(5)
- 收藏
- 关注
原创 project euler 21~25
Problem 21 Amicable numbers #include <iostream> #include <cstdio> #include <cmath> using namespace std; const int N = 10000 + 10; int work(int n) { int factorSum[N]; for(...
2019-12-08 20:56:57 137
原创 project euler 16~20
Problem 16 Power digit sum 思路 高精度乘法,这里用了万进制数,可以少一些循环 #include <iostream> #include <cstdio> using namespace std; const int N = 1000 + 10; int work(int x, int n) { int dig[N]; in...
2019-12-05 21:56:08 238
原创 project euler 11~15
Problem 11 #include <iostream> #include <cstdio> using namespace std; const int N = 20 + 10; int work(int n) { int arr[N][N]; for(int i = 0; i < n; ++i) { for(int j ...
2019-12-05 21:27:40 146
原创 project euler 6~10
Problem 6 Sum square difference #include <iostream> #include <cstdio> using namespace std; int work(int n) { int t1 = 0, t2 = 0; for(int i = 1; i <= n; i++) { t1 += i...
2019-12-03 22:40:20 121
原创 project euler 1~5
Problem 1 Multiples of 3 and 5 #include <iostream> #include <cstdio> using namespace std; int work(int n) { int ans = 0; for(int i = 0; i < n; i++) { ans += (i%3 == 0...
2019-12-03 22:17:24 122
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人