Last active
February 3, 2020 06:40
-
-
Save dboyliao/02491a8713dfa8df7b1a4bd931ff61ea to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import sys | |
| def main(): | |
| n = int(sys.argv[1]) | |
| to_ignore = set([]) | |
| nums = [j for j in range(n, 0, -1)] | |
| nums += [j for j in range(2, n + 1)] | |
| for i in range(1, n + 1): | |
| to_print = [str(j) if j not in to_ignore else " " for j in nums] | |
| print(" ".join(to_print)) | |
| to_ignore.add(i) | |
| if __name__ == "__main__": | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment