解题思路:
注意事项:
参考代码:
#include<iostream> #include<algorithm> #include<string.h> using namespace std; int main(){ char s[15]; scanf("%s",&s); char a[15]; strcpy(a,s); sort(s,s+strlen(s)); int i=0; do{ if(strcmp(a,s)==0) printf("%d",i); i++; }while(next_permutation(s,s+strlen(s))); return 0; }
0.0分
1 人评分
ASCII帮了大忙浏览:748 |
C语言程序设计教程(第三版)课后习题10.2 (C语言代码)浏览:504 |
C语言程序设计教程(第三版)课后习题6.2 (C语言代码)浏览:703 |
最小公倍数 (C语言代码)浏览:1025 |
printf基础练习2 (C语言代码)浏览:617 |
简单的a+b (C语言代码)浏览:478 |
1035 题解浏览:778 |
2004年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:324 |
判定字符位置 (C语言代码)浏览:792 |
链表数据求和操作 (C语言代码)浏览:941 |