摘要: 1 #include 2 using namespace std; 3 4 int main() 5 { 6 int n, m, i; 7 long long a[25], b[25]; 8 a[0] = 1; a[1] = 1, a[2] = 2; 9 for (i = 3; i > n >> m) 18 { 19 ... 阅读全文
posted @ 2018-03-05 21:49 ouyang_wsgwz 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 5 int main(){ 6 long long n; 7 while (cin >> n){ 8 if (n == 0) 9 break; 10 if (n == 1){ 11 c... 阅读全文
posted @ 2018-03-05 21:14 ouyang_wsgwz 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 //错排问题,直接用公式 6 //(n-1)*(f(n-1) + f(n-2)) 7 8 double f(int n){ 9 if (n == 1) 10 return 0; 11 if (n == 2) 12 ... 阅读全文
posted @ 2018-03-05 20:59 ouyang_wsgwz 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 //错排问题,直接用公式 5 //(n-1)*(f(n-1) + f(n-2)) 6 7 long long f(int n){ 8 if (n == 1) 9 return 0; 10 if (n == 2) 11 return ... 阅读全文
posted @ 2018-03-05 20:47 ouyang_wsgwz 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 bool huiwen(char a[], int n){ 3 4 int i, j; 5 i = 0; j = n - 1; 6 7 while (i = 10){ 32 buffer[counter] = temp - 10 + 'A'; 33 } 3... 阅读全文
posted @ 2018-03-05 20:39 ouyang_wsgwz 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 const int maxn = 10005; 5 char biao[] = "0123456789ABCDEF"; 6 int main(){ 7 int a, b; 8 char s[maxn]; 9 int len; 10 while (ci... 阅读全文
posted @ 2018-03-05 20:28 ouyang_wsgwz 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 const int maxn = 10005; 5 char biao[] = "0123456789ABCDEF"; 6 int main(){ 7 int a, b; 8 char s[maxn]; 9 int len; 10 while (ci... 阅读全文
posted @ 2018-03-05 20:23 ouyang_wsgwz 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 6 typedef long long LL; 7 8 int main(){ 9 10 LL a, b; 11 while (cin >> a >> b){ 12 int t; 13 int ans =... 阅读全文
posted @ 2018-03-05 20:15 ouyang_wsgwz 阅读(146) 评论(0) 推荐(0) 编辑