Created
October 10, 2011 12:42
-
-
Save iizukak/1275208 to your computer and use it in GitHub Desktop.
Codeforces Beta Round #89 (Div. 2), problem: (B) Present from Lena, 118B, Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inp = int(raw_input()) | |
k = inp - 1 | |
def generate(n): | |
return [' ' for i in range(inp - n + 1)] \ | |
+ [str(i) for i in range(n)] + [str(i) for i in range(n-1)][::-1] | |
for i in range(inp + 1): | |
print " ".join(generate(i + 1)) | |
while(k >= 0): | |
print " ".join(generate(k + 1)) | |
k -= 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment