Submit | All submissions | Best solutions | Back to list |
PASCAL_T - Pascal’s triangle |
Wersja polska | English version |
For given integer n, your task will be to print nth line of Pascal's triangle.
1 - 0th line
1 1 - 1st line
1 2 1 - 2nd line
1 3 3 1 - 3rd line
1 4 6 4 1 - 4th line
...
Input
The first line of the standard input contains one integer t (t<101) which is the number of test cases.
In each of the next t lines there is one integer n (0<=n<101).
Output
For each n, print nth line of Pascal's triangle.
Example
Input:
2
7
0
Output:
1 7 21 35 35 21 7 1
1
Added by: | Piotr Kąkol |
Date: | 2009-12-22 |
Time limit: | 6s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: SCM qobi |
Resource: | Pascal's triangle |
hide comments
|
|||||
2010-04-25 13:30:46 Zoltán Zámbori
What to do if no native big number support installed for Perl? Complaining on the forum is hopeless, so i will ask You to make smaller test cases and/or to increase time limits. Last edit: 2010-04-25 13:31:19 |
|||||
2010-04-25 11:10:21 Piotr KÄ…kol
I've changed time limits in most problems to 10sec and I'll almost always give such a limit from now. Although, I won't change big tests in this task because they're so big deliberately. ;-) |
|||||
2010-04-24 00:17:35 Zoltán Zámbori
I don't like time limits and big numbers in the problems. I must leave 2 char "fat" in my code because of "time limit exceeded"; and 11 because of the large test cases :-( |
|||||
2010-01-22 14:32:42 Piotr KÄ…kol
I checked them and I found the mistake. Now everything is ok. Sorry for the mistake and thank you for information. |
|||||
2010-01-21 19:55:44 .:: Pratik ::.
Can admins please check the cases? |