Created
November 21, 2011 12:04
-
-
Save pagenoare/1382448 to your computer and use it in GitHub Desktop.
ARKUSZ_CZ_II; Zad. 6
This file contains 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
222 22121 | |
211 12020 | |
12 21111 | |
2010 20122 | |
1222 12211 | |
2021 20122 | |
111 10221 | |
2 10010 | |
111 22211 | |
122 10221 | |
1010 201101 | |
1 222010 | |
1211 111101 | |
1 121002 | |
2 112001 | |
20222 112011 | |
1010 201010 | |
1212 102112 | |
21 202102 | |
10 220122 | |
10 1110021 | |
1 2102202 | |
121 1121102 | |
211222 1022112 | |
110222 2211120 | |
1111 1010210 | |
11 2120000 | |
1111 1121010 | |
110122 1212100 | |
121220 2200110 | |
2 22211010 | |
2 21112021 | |
1200212 22011101 | |
10 12102122 | |
21020 21012022 | |
22 22122201 | |
100 10212112 | |
20 10011022 | |
1101020 22112112 | |
210112 10002202 | |
2102 210200122 | |
22 121022022 | |
102 210200121 | |
100012 220210002 | |
111200 101012202 | |
220200212 202000020 | |
101202222 121001112 | |
221102102 212221122 | |
102201202 120222121 | |
110110120 111002012 |
This file contains 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
22212121111 102020112211112201010 | |
22202221 221122021101221011002 | |
101000101011222 111122002212001020110 | |
111220101021 201110101021002021120 | |
22 202221120112001020101 | |
2021 2002112011202102000220122000111 | |
1 2100210220210211121102221122200 | |
211220102221211120111111 1102100112120000111110121010201 | |
122 1212100212122022001100222211010 | |
221 1120212020021222011101000021021 | |
21210201101202201212122201100000212112 12000011022211010202211211222101120000220 | |
1110211020012202212102202200021102001 21110001222021000221112000010122022202002 | |
21020000200012022220210 11112221102102212221122102201202120222121 | |
2 11101200110020121212221210100120200022001 | |
1020002220112122120000101010111 21220112012001202222001010021002120221011 | |
111120110211101021010010200021101220122210212 121022012020020201112211021122022200011120211022200 | |
111110102112201202010000012010111010001020101021 121201002121121002200021101121211110222111221210201 | |
220212222002000012 201210220210011102202011002210211201121212020202212 | |
2020 112011012202012001020111200121002120012102110222002 | |
1120111212112 220211212010020120011011210110011210020200102122210 | |
21121222022122 2110220112112201021112221001212111211022202020000010210201211 | |
210011110122020 1010120212022110020111110220100200210110102111211112101011112 | |
1102211221220212220201002000010122021000 2122220212212100220122000111100022200110111221020010110102012 | |
1111011110122122010021210020121011021102202 2200121212120102122211000100000000010021001222120002111010212 | |
200120122220222111111011 1010210012010001220101100222212012021121120220110002012111121 | |
222221122022200102022201101021210210 202202020000110211001202212012020010001212122121211121211211002 | |
100001112212100 110000120012220011201221120102001022011020221112221111211222200 | |
22022021100112021021011210000211221021102001 210102220200111202212222202211010111010112212101222110001202202 | |
202002201200122111012 210211111020112220022200210102011220020200210201002212012111222 | |
10220202011011122121001201120002112000222102 211122011002021120202211221121210121000002122000102101221201122 | |
11201000002011020210021012021021021 2102022221200200110002120211002010210010110200010112110200002110 | |
2100022021102012010112000221210002200002200 1022112101121002222120122201012022020002102221011002200222222120 | |
1111021011011200120020201222200010212 2100112020120021100202101200212012000100010122201100100222202220 | |
2 1220011210000121221200110111222221101220220221212021220122220222 | |
1210111221020010022121211011122201210022200 1121002022012212021012200112002100200001201101111010101012100211 | |
22102010221112221002 1222202000221112212221102012120120102021200121101020020100200201 | |
1010 1212112022012022200220210222021100122202101110020202222212111000 | |
12202121010020021020111010211102010010202121210111102002011221 2101021020222022021112222202221112212202022200110200200121111112 | |
21102010012002221121020212101120012222100 1120100220100201020200002200000200020221201221100111021111122020 | |
211021120000120221021211020210012121020002020 1222202102022221011110200110100120200101022120211122101212121022 | |
10200020002112001122020221221120101121020102120022212201120202 2021212210022220212222122210011210000110122101220222122110022021 | |
2020112100111111000211121121010001020022 2221222120202210100021012120110101201020220021100122210111001222 | |
21011111120220000020012111220222211202001220 1000111110220220011121120222102220102010210211220002222111212101 | |
1211200201222102122221110100112 1202000011001222011220021010220001011212021220000121201022200110 | |
20010201210120212102002202 1000021001011001100110212002112000202220010101001011211001012121 | |
1221012000100120222210121111122000011101012221122102220211022002 2112022112222210220011012101020111011022221220222212120111202011 | |
1022202020100112011002222101101121012222000021211110021200010211 2002111021022001101000101122221122111201111101021202220200022200 | |
1120001020102220011022220222222010101220201021220012020210011220 1001021200022111022122110200122100200112100211210120100000021021 | |
2221111200212021010101222002111202022202220211000210022022002220 1221221111111120022002101220201010112112110210001200001111010001 | |
1102122012220000101022100001221112210101212221102011110212200221 2001200220012202220200211201101011202211100022201212100200001010 |
This file contains 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
12 1 | |
22 10 |
This file contains 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
100120 | |
20001 | |
21200 | |
22202 | |
21210 | |
22220 | |
11102 | |
10012 | |
100022 | |
11120 | |
202111 | |
222011 | |
120012 | |
121010 | |
112010 | |
210010 | |
202020 | |
111101 | |
202200 | |
220202 | |
1110101 | |
2102210 | |
1122000 | |
2011111 | |
10022112 | |
1012021 | |
2120011 | |
1122121 | |
2022222 | |
10022100 | |
22211012 | |
21112100 | |
100212020 | |
12102202 | |
21110112 | |
22200000 | |
10212212 | |
10011112 | |
100220202 | |
10220021 | |
210210001 | |
121022121 | |
210201000 | |
221010021 | |
101201102 | |
1122201002 | |
222211111 | |
1211101001 | |
1000201100 | |
221112202 |
This file contains 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
102020120011102022121 | |
221122021102020221000 | |
111122110212102102102 | |
201110101202222122211 | |
202221120112001020200 | |
2002112011202102000220122002202 | |
2100210220210211121102221122201 | |
1102101101110110110022011122012 | |
1212100212122022001100222211202 | |
1120212020021222011101000022012 | |
12021222001012220111201111200201120220102 | |
21111112210111020201101102220022121011010 | |
11112221102102220012212110101221220220101 | |
11101200110020121212221210100120200022010 | |
21220112020021212212120202211002222001122 | |
121022200210201112221002101202222221120111111010112 | |
122012120001010211102101101210221222002120012011222 | |
201210220210011102202011002210212122111211022210001 | |
112011012202012001020111200121002120012102111001022 | |
220211212010020120011011210110011210022020221112022 | |
2110220112112201021112221001212111211022202020021202210001110 | |
1010120212022110020111110220100200210110102112121200211210202 | |
2122220212212100220200110100022020120101020000020021002200012 | |
2200121212120102201022011210122122020112212020011020202120121 | |
1010210012010001220101100222212012022022011120101001200222202 | |
202202020000110211001202220012011202101120001221120000010121212 | |
110000120012220011201221120102001022011020221120021120101212000 | |
210102220200111210012022001011122202101201122102211101100011210 | |
210211111020112220022200210102011220020201112210211112212000011 | |
211122011002021120220202200202222020121011100120111220222201001 | |
2102022221200200110002120211020211210012121220220210122221100201 | |
1022112101121002222200000000110201102012221222002212210200002020 | |
2100112020120021100202101202100110011111211012222002100122220202 | |
1220011210000121221200110111222221101220220221212021220122221001 | |
1121002022012212021021111001000120210101100012122210002222200111 | |
1222202000221112212221102012120120102021200220210101011220121210 | |
1212112022012022200220210222021100122202101110020202222212112010 | |
2121000212002112112210110220202221222220002022021012002200200110 | |
1120100220100201020200101002010212100220100012012212211201121120 | |
1222202102022221012021222000101011121200010211121212000002200112 | |
2102120000102102221121220202010100102001212211111022112011220000 | |
2221222120202210100021021210222202012201221002222020220112022021 | |
1000111110220220011212202111000210102101000100211002211020221021 | |
1202000011001222011220021010220010000120000212110021122210000222 | |
1000021001011001100110212002112000210010021002211202200110022100 | |
11110111120100101212221210212212111022201011212122022111100001020 | |
10102020111122120112010101001100020201200111200010020012100110111 | |
2121022220202101110222101200121111002110002010200202120210110011 | |
11220110012100211102111101000012212212022101121002110100210012221 | |
10111100010002210022000011210022201120020020021011000211112202001 |
This file contains 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
20 | |
102 |
This file contains 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
# coding: utf-8 | |
import string | |
digs = string.digits + string.lowercase | |
j = 3 | |
f = open('pary_%s.txt' % j, 'r') | |
lines = f.readlines() | |
f.close() | |
def int2base3(value): | |
if value == 0: | |
return '0' | |
if value < 0: | |
value *= -1 | |
result = [] | |
while value: | |
result.append(digs[value % 3]) | |
value /= 3 | |
result.reverse() | |
return ''.join(result) | |
liczby = [int2base3(sum([int(liczba.split()[0], 3), int(liczba.split()[1], 3)])) for liczba in lines] | |
fwyniki = open('wyniki_%s.txt' % j, 'w') | |
for liczba in liczby: | |
fwyniki.write('%s\n' % liczba) | |
fwyniki.close() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment