<s> __author__ = """<STR_LIT>""" <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> from os import getcwd <EOL> from os import sys <EOL> sys . path . append ( getcwd ( ) ) <EOL> from MOAL . helpers . display import Section <EOL> from functools import wraps <EOL> from random import randrange as rr <EOL> DEBUG = True if __name__ == '<STR_LIT:__main__>' else False <EOL> def _check ( func , * args , ** kwargs ) : <EOL> @ wraps ( func ) <EOL> def inner ( * args , ** kwargs ) : <EOL> x , y = args <EOL> assert type ( x ) == type ( y ) and x is not y <EOL> return func ( * args , ** kwargs ) <EOL> return inner <EOL> @ _check <EOL> def xor_swap ( x , y ) : <EOL> x ^= y <EOL> y ^= x <EOL> x ^= y <EOL> return x <EOL> if DEBUG : <EOL> with Section ( '<STR_LIT>' ) : <EOL> nums = [ ( rr ( <NUM_LIT:10> , <NUM_LIT> ) , rr ( <NUM_LIT:10> , <NUM_LIT> ) ) for _ in range ( <NUM_LIT:12> ) ] <EOL> for vars in nums : <EOL> x , y = vars <EOL> assert xor_swap ( x , y ) == y <EOL> print ( '<STR_LIT>' . format ( x , y , xor_swap ( x , y ) ) ) </s>
