【HUSTOJ】1073: 拐角VI
2016-05-06 13:07
253 查看
1073: 拐角VI
Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 40 Solved: 34
原题链接
Description
输入整数N,输出相应方阵。
Input
一个整数N。( 0 < n < 10 )
Output
一个方阵,每个数字的场宽为3。
Sample Input
5
Sample Output
1 2 3 4 5 1 2 3 4 4 1 2 3 3 3 1 2 2 2 2 1 1 1 1 1
HINT
Source
#include<stdio.h> main() { int N; scanf("%d",&N); for(int i=1;i<=N;i++) { int k=1; for(int j=1;j<=N;j++) { if(i+j<N+1) {printf("%3d",k++);} else {printf("%3d",k);} } printf("\n"); } }
相关文章推荐
- iOS开发系列--打造自己的“美图秀秀”
- 关于c#数据库的简单应用-datagriview连接数据库及更相关操作
- Fresco简单的使用—SimpleDraweeView
- Android IOC 框架ViewInject(上)
- 毛玻璃效果
- Android异常捕获02
- Spark流处理解读(3)JOB源码解读
- 类的成员函数做回调函数
- EditTextView的介绍和使用
- Oracle中查询各种对象的方法小结
- 第1章 UML基础:类的关系
- 第十周-点类族设计项目1
- 我经历的IT公司面试及离职感受
- Yii2.0 rules验证规则大全
- web.xml 配置
- ExtJS自定义控件 之一:datetimefield控件
- 上传文件功能-1
- 二叉树的非递归遍历
- NYOJ 题目77 开灯问题
- 2、Ajax与Java通过POST方式交互