1071: 拐角IV
Time Limit: 1 Sec Memory Limit: 128 MBDescription
输入整数N,输出相应方阵。
Input
一个整数N。( 0 < n < 10 )
Output
一个方阵,每个数字的场宽为3。
Sample Input
5
Sample Output
1 2 3 4 5
2 2 3 4 5
3 3 3 4 5
4 4 4 4 5
5 5 5 5 5
HINT
Source
#include<stdio.h>
main()
{
int N;
scanf("%d",&N);
for(int i=1;i<=N;i++)
{
int k=i;
for(int j=1;j<=N;j++)
{
if(i>=j)
{printf("%3d",k);}
else
{printf("%3d",++k);}
}
printf("\n");
}
}

这是一道来自HUSTOJ的编程题目1071,题目名称为拐角IV。时间限制为1秒,内存限制为128MB。题目提供了Description、Input、Output、Sample Input、Sample Output和Hint等指导信息,帮助参赛者理解并解决问题。
2703

被折叠的 条评论
为什么被折叠?



