Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Information Science and Engineering
杨辉三角
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KB
Total submit users: 261, Accepted users: 239
Problem 10477 : No special judgement
Problem description
  给定一个非负整数n,打印杨辉三角前n行。

Input
  输入数据有若干行。每一行有一个非负整数n1<=n<=20)对应一种情形。

Output
  对于每一种情形,先输出“Case #:”(#为序号,从1起),换行;然后输出结果(参见输出样例)。设置setw(6)使数据占6个字符宽;每种情形中,最后一行第一个数字从第6列开始,每行最后一个数字后面不需要输出空格。

Sample Input
3
4
Sample Output
Case 2:
           1
        1     1
     1     2     1
Case 3:
              1
           1     1
        1     2     1
     1     3     3     1
Submit   Clarifications   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:2106 today,12073155 total, since 2010-05-07