1229
来源:互联网 发布:c程序设计经典编程题 编辑:程序博客网 时间:2024/06/06 00:26
[提交][状态][讨论版]
题目描述
TY is a stupid guy. One day, he was asked to write all permutation of 1,2,3,4,5 on blackboard, but he was not managed to finish it. Can you help him?
Write a program output all the permutation of 1,2,3,4,5 in a ascend order.
输入
(no input)
输出
Print all the permutation of 1,2,3,4,5 in a an ascend order.
One permutation per line.
12345
12354
...
54321
样例输入
样例输出
提示
来源
#include<stdio.h>int main(){ int i,j,k,l,m;for(i=1;i<=5;i++)for(j=1;j<=5;j++)for(k=1;k<=5;k++)for(l=1;l<=5;l++)for(m=1;m<=5;m++)if(i!=j&&i!=k&&i!=l&i!=m&&j!=k&&j!=l&&j!=m&&k!=l&&k!=m&&l!=m)printf("%d%d%d%d%d\n",i,j,k,l,m);}
0 0
- 1229
- 1229
- 1229
- 1229
- 1229
- hdu 1229 hdoj 1229
- poj 1229
- poj 1229
- hdu-1229
- hdu 1229
- ZOJ-1229
- XDOJ 1229
- 1229 还是A+B
- 1229 Call-ID
- HDU 1229 A + B
- 1229 数字游戏
- 1229 还是A+B
- NEUQ 1229: 密码截获
- Out of memory on a 14745616-byte allocation.+Bitmap的内存优化
- 深入理解Express.js
- Java语言基础(六)之 —— 循环结构(do...while循环)
- Scroller的用法
- code(vs)1048 石子归并(区间dp)
- 1229
- 学习笔记---文件读写
- 51node 1001 数组中和等于K的数对
- Android Animation的实现原理
- 你是怎么思考的?
- OpenTSDB安装极简备忘
- 模式识别第5次作业
- 1231
- 细节决定未来(输出链表)