@jjallan/

BlueImpracticalXiphosuran

Python 2.7

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
for testInput in [(1,1,[]),(7,6,[3,3,4,4,5,6,2]),(5,5,[0,0,0,0,0,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4]),(4,4,[2,2,1,3,2,1,3,1,1,2,3,3,0,0,0,0]),(10,10,[0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,9])]:
	w,h,s=testInput
	print 'Width', w, 'Height', h, 'Sequence', s, ':\n'
	i,x=0,['']*w
	for c in s:x[c]+='XO'[i%2];i+=1
	for c in x:print(c+'.'*h)[:h]
	print''