Skip to content
This repository has been archived by the owner on Feb 12, 2018. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/ktisha/python2012
Browse files Browse the repository at this point in the history
  • Loading branch information
duckens committed Dec 10, 2012
2 parents 9554c74 + fbea84b commit 0db084d
Show file tree
Hide file tree
Showing 10 changed files with 1,432 additions and 0 deletions.
56 changes: 56 additions & 0 deletions paletskih/generator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import sys
f = open('input9.txt', "w")
i = 1
n = 12
m = 10
f.write(str(n))
f.write(' ')
f.write(str(m))
f.write('\n')
f.write('1 1 ')
f.write(str(n))
f.write(' ')
f.write(str(m))
f.write('\n')
f.write('4\n')
while i <= n:
j = 1
while j <= m:
if ((i*j + 3*i + 2*j - i*i*i*j) % 5 == 0 or (i*j + 3*i + 2*j - i*i*i*j) % 5 == 1):
a = '0 '
a = a + str(i)
a = a + ' '
a = a + str(j)
f.write(a)
f.write('\n')
if ((i*j + 3*i + 2*j - i*i*i*j + i*j*j - 1 + 2*j) % 5 == 2 or (i*j + 3*i + 2*j - i*i*i*j + i*j*j - 1 + 2*j) % 5 == 1):
a = '1 '
a = a + str(i)
a = a + ' '
a = a + str(j)
f.write(a)
f.write('\n')
j = j + 1
i = i + 1
i = 1
while i <= n:
j = 1
while j <= m:
if ((i*j + 3*i + 2*j - i*i*i*j) % 7 == 0 or (i*j + 3*i + 2*j - i*i*i*j) % 7 == 1):
a = '0 '
a = a + str(i)
a = a + ' '
a = a + str(j)
f.write(a)
f.write('\n')
if ((i*j + 3*i + 2*j - i*i*i*j + i*j*j - 1 + 2*j) % 7 == 0 or (i*j + 3*i + 2*j - i*i*i*j + i*j*j - 1 + 2*j) % 7 == 1):
a = '1 '
a = a + str(i)
a = a + ' '
a = a + str(j)
f.write(a)
f.write('\n')
j = j + 1
i = i + 1
f.close()
print ('Ready!')
56 changes: 56 additions & 0 deletions paletskih/generator.py~
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import sys
f = open('input8.txt', "w")
i = 1
n = 12
m = 10
f.write(str(n))
f.write(' ')
f.write(str(m))
f.write('\n')
f.write('1 1 ')
f.write(str(n))
f.write(' ')
f.write(str(m))
f.write('\n')
f.write('4\n')
while i <= n:
j = 1
while j <= m:
if ((i*j + 3*i + 2*j - i*i*i*j) % 5 == 0 or (i*j + 3*i + 2*j - i*i*i*j) % 5 == 1):
a = '0 '
a = a + str(i)
a = a + ' '
a = a + str(j)
f.write(a)
f.write('\n')
if ((i*j + 3*i + 2*j - i*i*i*j + i*j*j - 1 + 2*j) % 5 == 2 or (i*j + 3*i + 2*j - i*i*i*j + i*j*j - 1 + 2*j) % 5 == 1):
a = '1 '
a = a + str(i)
a = a + ' '
a = a + str(j)
f.write(a)
f.write('\n')
j = j + 1
i = i + 1
i = 1
while i <= n:
j = 1
while j <= m:
if ((i*j + 3*i + 2*j - i*i*i*j) % 7 == 0 or (i*j + 3*i + 2*j - i*i*i*j) % 7 == 1):
a = '0 '
a = a + str(i)
a = a + ' '
a = a + str(j)
f.write(a)
f.write('\n')
if ((i*j + 3*i + 2*j - i*i*i*j + i*j*j - 1 + 2*j) % 7 == 0 or (i*j + 3*i + 2*j - i*i*i*j + i*j*j - 1 + 2*j) % 7 == 1):
a = '1 '
a = a + str(i)
a = a + ' '
a = a + str(j)
f.write(a)
f.write('\n')
j = j + 1
i = i + 1
f.close()
print ('Ready!')
165 changes: 165 additions & 0 deletions paletskih/input2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
12 10
1 1 12 10
4
0 1 1
1 1 1
0 1 4
1 1 5
0 1 6
1 1 6
0 1 9
1 1 10
1 2 3
0 2 4
0 2 5
1 2 8
0 2 9
0 2 10
1 3 1
0 3 2
0 3 4
1 3 4
1 3 6
0 3 7
0 3 9
1 3 9
0 4 2
0 4 4
1 4 4
1 4 5
0 4 7
0 4 9
1 4 9
1 4 10
1 5 2
0 5 3
1 5 3
0 5 5
1 5 7
0 5 8
1 5 8
0 5 10
0 6 1
1 6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