def par(a,b,szer,wys,xyz): #xyz musi byc rozne 1 lub 2 data=[] c=wys/szer #obliczenie ile sztuk sie zmiesci x=z=y=0 while b>=0: #b-szerokosc a-wysykosc if xyz==1: d=a #d-zapasowa wysokosc print "1" while d>0: f=b+szer #zapasowa szerokosc e=c #e-zapasowa mnogosc while e>0 and (f-szer)>0 and d>0: #plytki ||| print "1.1" e=e-1 if (f-szer)>=szer and d>=wys: print "1.1.1" x=x+1 data.append((f+(c-2)*szer,d-(c-1)*szer,szer,wys)) elif d0 and d>0 and b>0: #plytki poziome print "1.2" e=e-1 if d>=szer and b>=wys: print "1.2.1" x=x+1 data.append((b,d,wys,szer)) elif d0: e=c while e>0 and d>0 and b>0: #plytki poziome print "2.1" e=e-1 if d>=szer and b>=wys: print "2.1.1" x=x+1 data.append((b,d,wys,szer)) elif d0 and (f-szer)>0 and d>0: #plytki ||| print "2.2" e=e-1 if (f-szer)>=szer and d>=wys: print "2.2.1" x=x+1 data.append((f+(c-2)*szer,d-(c-1)*szer,szer,wys)) elif d