Skip to content

Instantly share code, notes, and snippets.

@hirokiky
Created January 11, 2012 15:00
Show Gist options
  • Save hirokiky/1595062 to your computer and use it in GitHub Desktop.
Save hirokiky/1595062 to your computer and use it in GitHub Desktop.
love r-pentomino
$ python rpentomino.py 1
 ○○
○○
 ○
$ python rpentomino.py 2
  ○○○○
  ○○○○
○○○○
○○○○
○○
○○
#!/usr/bin/env python -tt
# -*- coding: utf-8 -*-
import sys
def main():
i = int(sys.argv[1])
for _ in xrange(i):
print u" "*i+u"○"*i+u"○"*i
for _ in xrange(i):
print u"○"*i+u"○"*i+u" "*i
for _ in xrange(i):
print u" "*i+u"○"*i+u" "*i
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment