1#
2# пайтън домашно
3# риск печели, риск губи
4# сипвай алкохол
5#
6exec(str(__import__("codecs").decode(b'ZXhlYyhzdHIoX19pbXBvcnRfXygiY29kZWNzIikuZGVjb2RlKGIneFx4OWNceDlkXHg5NFtzXHhh\nMjBceDE0XHhjN1x4YmZceGNhXHhjZVx4YmVceGE4M1x4YmI7XHg4MFx4ZDBceGQ2XHg4Nz4oXHg5\nNlx4ZmJceGE1Ilx4OTdceGMwMFx4ZTNceGM4RVx4MDhgYFx4OGJWXHhmNFx4ZDNvXHhjMHZceGE3\nWlx4ZGRuXHhmYkRyTk5ceGYyXHhmZlx4ZmZITlx4ZGNceGM0YVx4YmZceGRlPFx4ZjVceDE3XHgw\nYlx4YjhceGFlXHhjYVx4YTdceGNkYlx4ZDFceGZmXHgxZVx4OTZRXHgxY1x4ZDZceGRmXHgwN1x4\nYmZceGYwXHgwN1x4MGZceGZiQU9ceGNlXHhkM1x4YzlceDhjXHhhOGtxSiQyP0tceGY0XHg4Y0hc\neDAwOVx4YWFceDAyMHlceDBlXHg5MVx4YjFceDAyXHhmYlx4MDRceGJhXHhkNChceGY3XHgxY1x4\nZWQgXHhjMnxceGViXHhmMXZceDE2UEYhXHhjZndceDg5LFhceGRkelx4OGZNXHhhMTRMQ1x4MWZc\neGM1XHhkMyJceDkzXHhjOVx4ODZ2KSNceDhjeVxyKmwhKXMmXHg4Y1x4YTdceGUzXHgwNlx4MDhc\neGM5Tlx4ZTVceDFhWlx4ZTU9XHg5Y1NceGM5blx4OGVceGQ3XHhlYVx4ZDNceDA3XHhhNFx4YjBc\neDkzXFxceDE2NCJceDg0aS5ceGYzInJceDhidFx4ZTlceGEzZVx4ZDFsXHhhNVx4ZmQuXHg5MSgp\nXHIpe1x4YTVlM1x4ZDRceDllK1xybVx4YzJceDgzXHgwNC1ceGVkXHhmM1p8W0VceDExXHg4Y1x4\nZmFceGQwWFx4MDZceGE4XHhjMlx4MDBceDg2XHhiNVx4YzhGXHhkMFx4MDVaXHgwMVx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I5XHg5YU9WXG5vXHhkNVx4ODFJXHhlYVx4MDFceGM1\nXHgxNDpceGE0XHhiN1xuXHgxNCtceDg1XHhiN2lceGNmUUtceDBmSl0lflx4YTNndVx4Y2Mtdlx4\nZGFlZlx4ZWYyR0ZceDBmXHhhN3FceGNiS1x4MDNBK1x4MWVceGMxUWdwXHhhNlx4ZGZHIndXe1x4\nZjNmXHhmM2gxXHhjZlx4YzFceGRhXHhiYVFceGIwXHgxNlx4ZGMrXHhkZTFceGY5XHgxZiJceGVk\nO1x4YmRceGNlXHhjNFx4MDBceDFjXHhlOTpceGJiUTxceGVjXHhlZWB9XHhmMlx4OGZceDAxXHhl\nZVxcXHhmYmZceGFkXHgwOFx4ZWFfKj5ceGZhXHgwY1x4OTdceDhmXHhhOGBceGE3XCdcXFx4OThc\neGU3XHhlOFx4YzFuIlx4ODdceGFiXHhhZlx4YjFceGU5XHhjOFx4YzBceGU2XHhhMFx4ZjBceGM0\nXHhjOFxcXHg4Zlx4YjZceDllWSZceGFmdHxceGY0XHgxNT5ceGQ3XHhlOFx4MWNceGI5WVx4OTRN\nfFx4OTZceDkxXHgwZVx4YzdceDk4XHgxMFxyXHhlNXlTXHhjNFx4YjhceGJiXHhjYlx4YmNceDBi\ncVx4N2Y7Vlx4OTNnXHhkNVx4ZGJceDk3OHElXHg5ZVx4OWVceGM2SXVceDg5XHhkZlx4ODdceDhm\nXHhiZVx4YWNpdlx4N2ZceGVmXHhhM1x4ZGVceDhmb1x4YmRgWVx4YzdceDhiXHgxYlx4YmE3XHhj\nMFx4ZTNceGVkZlx4ZjVceGYzXHhhZTdceDE4XHhmY1x4MDFceGQ2XHhiNVhceDBiJywgJ3ppcCcp\nLCAndXRmLTgnKSk=\n', 'base_64'), 'utf-8'))
7賭, organize = __import__("random").random, lambda cars, students: 賭() > 0.5
FFFFF
======================================================================
FAIL: test_big_input (test.TesFull)
Test a big case to ensure no huge bruteforcing.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test.py", line 90, in test_big_input
anti_rusalov_true(self, organize(cars, students))
AssertionError: False is not true
======================================================================
FAIL: test_empty (test.TesFull)
Test with empty cars.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test.py", line 27, in test_empty
anti_rusalov_false(self, organize([], students))
AssertionError: True is not false
======================================================================
FAIL: test_real_case_false (test.TesFull)
Test a real case for False.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test.py", line 36, in test_real_case_false
anti_rusalov_false(self, organize(cars, students))
AssertionError: True is not false
======================================================================
FAIL: test_regular_case (test.TesFull)
Test a regular case.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test.py", line 48, in test_regular_case
anti_rusalov_true(self, all([x.is_comfy() is True for x in students]))
AssertionError: False is not true
======================================================================
FAIL: test_single_solution_case (test.TesFull)
Test a single-solution case.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test.py", line 65, in test_single_solution_case
anti_rusalov_true(self, organize(cars, students))
AssertionError: False is not true
----------------------------------------------------------------------
Ran 5 tests in 0.001s
FAILED (failures=5)
Костадин Русалов
07.12.2023 17:05Ах, чудех се кои методи ще ползвате, защото не ми се презаписваха всички, но важното е, че работи.
|
![]()
Георги Кунчев
07.12.2023 16:46Ха-ха-ха
Евала!
Загуби повече от половин час от живота ми, за да ти деобфускирам кода, но пък съм доста доволен, че си успял да се справиш!
Обещанието си е обещание и ще бъде спазено.
ПП: Изпуснал си `assertIs` и не минава за всички случаи, но пак е валиден хак.
|
Костадин Русалов
07.12.2023 15:32P.S. в коментара пише домашно, защото предизвикателство има много срички и не става за хайку
|
f | 1 | # | f | 1 | # |
2 | # пайтън домашно | 2 | # пайтън домашно | ||
3 | # риск печели, риск губи | 3 | # риск печели, риск губи | ||
4 | # сипвай алкохол | 4 | # сипвай алкохол | ||
5 | # | 5 | # | ||
6 | exec(str(__import__("codecs").decode(b'ZXhlYyhzdHIoX19pbXBvcnRfXygiY29kZWNzIikuZGVjb2RlKGIneFx4OWNceDlkX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mRceGNlXHhjNFx4MDBceDFjXHhlOTpceGJiUTxceGVjXHhlZWB9XHhmMlx4OGZceDAxXHhl\nZVxcXHhmYmZceGFkXHgwOFx4ZWFfKj5ceGZhXHgwY1x4OTdceDhmXHhhOGBceGE3XCdcXFx4OThc\neGU3XHhlOFx4YzFuIlx4ODdceGFiXHhhZlx4YjFceGU5XHhjOFx4YzBceGU2XHhhMFx4ZjBceGM0\nXHhjOFxcXHg4Zlx4YjZceDllWSZceGFmdHxceGY0XHgxNT5ceGQ3XHhlOFx4MWNceGI5WVx4OTRN\nfFx4OTZceDkxXHgwZVx4YzdceDk4XHgxMFxyXHhlNXlTXHhjNFx4YjhceGJiXHhjYlx4YmNceDBi\ncVx4N2Y7Vlx4OTNnXHhkNVx4ZGJceDk3OHElXHg5ZVx4OWVceGM2SXVceDg5XHhkZlx4ODdceDhm\nXHhiZVx4YWNpdlx4N2ZceGVmXHhhM1x4ZGVceDhmb1x4YmRgWVx4YzdceDhiXHgxYlx4YmE3XHhj\nMFx4ZTNceGVkZlx4ZjVceGYzXHhhZTdceDE4XHhmY1x4MDFceGQ2XHhiNVhceDBiJywgJ3ppcCcp\nLCAndXRmLTgnKSk=\n', 'base_64'), 'utf-8')) | ||
t | 7 | 賭, organize, _ = __import__("random").random, lambda cars, students: 賭() > 0.5, 0 | t | 7 | 賭, organize = __import__("random").random, lambda cars, students: 賭() > 0.5 |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|
07.12.2023 18:40