自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(43)
  • 收藏
  • 关注

转载 欧拉计划36(数字显示二进制)

/* 先求出一百万内所有回文数,放入num[1998]中 再求每个数的二进制是不是回文数。*/ #include <iostream> #include <Windows.h> #include <iomanip> using namespace std; ...

2018-05-05 11:14:00 132

转载 欧拉计划35

/*先求出所有素数,放在num[78498]里。再逐个判断num数组的每个数是不是圆周数 其中,圆周数的判断用到了queue数据结构,实现一个循环队列*/ #include <iostream> #include <Windows.h> #include <mat...

2018-05-05 10:21:00 151

转载 欧拉计划34

/*6个9组成的六位数的各位数阶乘和为7位,7个9也是七位,8个9,9个9也都是七位, 由此可知,从位数为7开始,阶乘和的增长跟不上位数的增长所以最多就是7位数*/ #include <iostream> #include <Windows.h> using names...

2018-05-04 20:56:00 106

转载 欧拉计划33

#include <iostream> #include <Windows.h> #include <iomanip> using namespace std; int main() { DWORD s = GetTickCount(); {...

2018-05-04 19:40:00 107

转载 欧拉计划32(字典序全排列STL)

#include <iostream> #include <algorithm> #include <Windows.h> using namespace std; int main() { DWORD s = GetTickCount(); ...

2018-05-04 18:57:00 105

转载 欧拉计划30

#include <iostream> #include <Windows.h> #include <math.h> using namespace std; bool fifth_c(int n) { int a[10]; for ...

2018-05-01 18:18:00 116

转载 欧拉计划29

#include <iostream> #include <Windows.h> #include <set> #include <math.h> using namespace std; int main() { DWORD s = G...

2018-05-01 18:17:00 121

转载 欧拉计划27

#include <iostream> #include <math.h> #include <Windows.h> using namespace std; int prime(int n)//b的值在n=0时肯定是素数 { int ok = 1;...

2018-05-01 18:16:00 93

转载 欧拉计划28

#include <iostream> #include <Windows.h> using namespace std; int64_t 行数(int64_t n); int64_t 右上(int64_t n); int64_t 左上(int64_t n); int...

2018-05-01 18:16:00 89

转载 欧拉计划25(加法器,大数相加)

#include <iostream> #include <Windows.h> #include <string> using namespace std; string Plus(string a, string b) { if (a.size(...

2018-05-01 18:14:00 94

转载 欧拉计划24(一种字典序全排列算法)

/******************************************************************************************************************************************* 字典序算法如...

2018-05-01 18:13:00 155

转载 欧拉计划23

#include <iostream> #include <Windows.h> using namespace std; bool abundant_num(int n) { int sum = 0; for (int i = 1; i &lt...

2018-04-30 11:05:00 67

转载 欧拉计划21

#include <iostream> #include <Windows.h>//亲和数不包括d(i)==i的对 using namespace std; int d(int n) { int sum = 0; for (int i = 1; i &l...

2018-04-30 11:04:00 107

转载 欧拉计划19

#include <iostream> using namespace std; int num_days()//计算天数 { int year = 1901; int nmon[13] = { 0,31,28,31,30,31,30,31,31,30,31,30,...

2018-04-30 11:03:00 89

转载 欧拉计划20

#include <iostream> using namespace std; int factorial_sum(int n)//其中,digit数组的输出倒着读便是乘积的值 { int digit[1000] = { 0 }; digit[0] = 1; ...

2018-04-30 11:03:00 95

转载 欧拉计划18

#include <iostream> #include <algorithm> using namespace std; int main() { int a[15][15]= { {75}, {95,64}, ...

2018-04-30 11:01:00 107

转载 欧拉计划17

#include <iostream> using namespace std; int letter(int n) { if (n == 1 || n == 2 || n == 6 || n == 10)return 3;//注意||左右都要有n== if (n ...

2018-04-30 11:00:00 111

转载 欧拉计划16

#include <iostream> #include <string> using namespace std; string multiplication_with_2(string a)//该乘法器默认乘数是2 { int a_len = a.s...

2018-04-30 10:59:00 81

转载 欧拉计划14

#include <iostream> using namespace std; int main() { int max = 0, max_num = 0; int64_t num;//注意此处num的类型,因为在while中num可能超出int for ...

2018-04-29 14:51:00 73

转载 欧拉计划15(递归)

#include <iostream> using namespace std; int64_t run(int x, int y) { if (x == 1)return y;//若横向走到头了,只能纵向走,再走y即可 if (y == 1)return 1;//...

2018-04-29 14:51:00 112

转载 欧拉计划13

#include <iostream> #include <string> #include <fstream> using namespace std; string big_num_plus(string a, string b) { i...

2018-04-29 14:50:00 109

转载 欧拉计划12

#include <iostream> #include <math.h> using namespace std; int64_t triangle_numbers(int n) { int64_t sum=0; for (int i = 1; i &...

2018-04-29 14:49:00 165

转载 欧拉计划10

#include <iostream> #include <math.h> using namespace std; int main() { int64_t sum = 2; for (int i = 3; i != 2000000; ++i)...

2018-04-29 14:48:00 104

转载 欧拉计划11

#include <iostream> using namespace std; int64_t max_n(int64_t *aa, int n) { int64_t temp; temp = aa[0]; for (int i = 1; i < n...

2018-04-29 14:48:00 93

转载 欧拉计划8

#include <iostream> using namespace std; int main() { char fuck[1001] = "7316717653133062491922511967442657474235534919493496983520312774...

2018-04-29 14:47:00 130

转载 欧拉计划5

/*本题求出1~20的最小公倍数即可。采用两数的乘积等于其最大公约数和最小公倍数的乘积。 两两求出最大公约数(辗转相除法)。*/ #include<iostream> using namespace std; int64_t Greatest_common_divisor(int6...

2018-04-29 14:46:00 110

转载 欧拉计划7

#include <iostream> using namespace std; int main() { int count = 0; int num = 2; int little_count = 0; while (count !=10...

2018-04-29 14:46:00 96

转载 欧拉计划4

#include <iostream> using namespace std; int main() { int key; int b[6]; int temp; for (int i = 100; i < 1000; ++i) { ...

2018-04-29 14:45:00 123

转载 求一个数的质因子

#include<iostream> using namespace std; int main() { int n, i = 2; cin >> n; while (i <= n) { if (n%i == 0) ...

2018-04-08 22:18:00 209

转载 简易图书管理系统

#include <iostream> #include <string> using namespace std; int main() { string book[100]; int book_number[100]; int have_bo...

2018-02-12 19:27:00 102

转载 n皇后(回溯)

//回溯过程时,将n列的位置全部走完 #include <iostream> using namespace std; int c[100];//c[i]=j表示第i行的皇后应该放在第j列 int cnt = 0;//计数 int n;//皇后的个数 void print() { ...

2018-02-09 12:10:00 45

转载 汉诺塔(递归)

#include <iostream> using namespace std; void hanoi(int n, char a, char b, char c) { if (n == 1) cout << a << "-->...

2018-02-05 13:17:00 62

转载 猜数游戏

/*系统会随机给出四位整数, 您有十次机会来猜对此数字, 每次猜测后, 系统将会提示您, 其中位置和数字均正确将以A表示, 数字正确而位置错误将以B表示, 希望您能顺利过关*/ #include <iostream> #include <stdlib.h> #in...

2018-02-04 17:58:00 114

转载 快速排序

#include <iostream> using namespace std; void swap2(int a[], int i, int j)//交换 { int t; t = a[i]; a[i] = a[j]; a[j] = t; } v...

2018-02-01 19:31:00 57

转载 归并排序

#include <iostream> using namespace std; void swap(int *a, int x, int y) { int t = a[x]; a[x] = a[y]; a[y] = t; } void merge(int ...

2018-02-01 18:36:00 56

转载 希尔排序

#include <iostream> using namespace std; void swap(int a, int b, int *x) { int t = x[a]; x[a] = x[b]; x[b] = t; } void inssort(in...

2018-02-01 16:53:00 96

转载 最大值堆

#pragma once #include <iostream> using namespace std; void swap(int a, int b, int *x) { int t = x[a]; x[a] = x[b]; x[b] = t; } cl...

2018-01-31 19:26:00 296

转载 链式队列

#pragma once #include <iostream> using namespace std; class Link { public: int element; Link* next; Link(int ele, Link* nextval) ...

2018-01-31 12:36:00 48

转载 顺序队列(数组)

#pragma once #include <iostream> using namespace std; class AQueue { private: int maxSize; int front; int rear; int *listArra...

2018-01-30 21:28:00 112

转载 链式栈

#pragma once #include <iostream> using namespace std; class Link { public: int element; Link *next; Link(const int &elemval, ...

2018-01-29 21:33:00 63

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除