【HUSTOJ】1070: 拐角III
2016-05-06 12:38
351 查看
1070: 拐角III
Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 41 Solved: 35
原题链接
Description
输入整数N,输出相应方阵。
Input
一个整数N。( 0 < n < 10 )
Output
一个方阵,每个数字的场宽为3。
Sample Input
5
Sample Output
5 5 5 5 5 5 4 4 4 4 5 4 3 3 3 5 4 3 2 2 5 4 3 2 1
HINT
Source
#include<stdio.h> main() { int N; scanf("%d",&N); for(int i=N;i>=1;i--) { int count=0; for(int j=N;count<N;j--) { count++; printf("%3d",j); if(i==j)j++; } printf("\n"); } }
相关文章推荐
- nginx php fastcgi Connection reset by peer的原因及解决办法
- MAVEN常用命令
- 信息安全经典书籍
- 面向项目(三)—— 宏定义举例
- 设置PL/SQL工具SQL窗口的字体大小及颜色
- Linux 操作系统下如何优雅的卸载软件
- Parameter must be a descendant of this view 错误
- RESTful 杂文归集
- css简要介绍
- Kafka 个人总结
- mysqldump参数详细说明(转)
- Nginx(负载均衡)+keepalived(双机热备)
- Woj 1608 - Calculation 状压dp
- 23种设计模式(1):单例模式
- 《java入门第一季》之面向对象(多态练习)
- Android5.0(L)输入法表情界面㊗和㊙显示框框
- 《java入门第一季》之面向对象(多态练习)
- maven 配置篇 之pom.xml
- iOS端播放VR图片
- 对于servlet初步理解