摘要: 1 #include 2 using namespace std; 3 int CalcAutomorphicNumbers( int n) 4 { 5 6 int count=0; 7 for(int i=0;i>num; 39 cout<<CalcAutomorphicNumbers(num); 40 } 阅读全文
posted @ 2018-01-30 00:40 在解放碑打望 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 int main() 4 { 5 char a[10]; 6 gets(a); 7 int len=strlen(a); 8 int sum=0,quan=16; 9 for(int i=len-1;i>1;i--) 10 { 11 if(a... 阅读全文
posted @ 2018-01-30 00:25 在解放碑打望 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 4 void getResult(long int input) 5 { 6 for (int i=2;i>a; 21 getResult(a); 22 return 0; 23 } 阅读全文
posted @ 2018-01-29 23:53 在解放碑打望 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 int main() 4 { 5 double a; 6 cin>>a; 7 if (a>=0) 8 cout<<(int)(a+0.5); 9 else 10 cout<<(int)(a-0.5); 11 } 阅读全文
posted @ 2018-01-29 23:38 在解放碑打望 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1 链接:https://www.nowcoder.com/questionTerminal/253986e66d114d378ae8de2e6c4577c1 2 来源:牛客网 3 4 #include 5 using namespace std; 6 int main() 7 { 8 int n; 9 int a[10]={0}; 10 int nu... 阅读全文
posted @ 2018-01-10 00:41 在解放碑打望 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 int cha_num(char *buff) 4 { 5 int i, j; 6 int len = strlen(buff); 7 int count = 0; 8 int flag = 0; 9 for(i = 0; i = 0 && buff[i] <= 127) 13 ... 阅读全文
posted @ 2018-01-09 23:56 在解放碑打望 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 int GetCount(int num) 4 { 5 int m=0; 6 while(num) 7 { 8 num &=(num-1); 9 m++; 10 } 11 return m; 12 } 13 int main() 14... 阅读全文
posted @ 2018-01-04 23:53 在解放碑打望 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 4 int main() 5 { 6 char a[1000]; 7 int i, n; 8 scanf("%s",a); 9 n = strlen(a); 10 for(i = n - 1; i >= 0; i--) 11 { 12 printf("%c", ... 阅读全文
posted @ 2018-01-04 23:45 在解放碑打望 阅读(120) 评论(0) 推荐(0) 编辑
摘要: #include #include int main() { char str[1000]; char *p; gets(str); while(p=strrchr(str,' ')) { printf("%s ",p+1); *p='\0'; } printf("%s",str); return... 阅读全文
posted @ 2018-01-04 23:16 在解放碑打望 阅读(135) 评论(0) 推荐(0) 编辑