# This code is adapted from OpenAI's release
# https://github.com/openai/human-eval/blob/master/human_eval/execution.py

import contextlib
import faulthandler
import io
import multiprocessing
import os
import platform
import signal
import tempfile
def 					_snake_case	(  __snake_case  ,     __snake_case  ,     __snake_case  ,     __snake_case						):
					_UpperCamelCase			     =     multiprocessing.Manager()
					_UpperCamelCase			     =     manager.list()

					_UpperCamelCase			     =     multiprocessing.Process(target=__snake_case  ,     args=(check_program, result, timeout)						)
					p.start()
					p.join(timeout=timeout + 1						)
					if p.is_alive():
										p.kill()

					if not result:
										result.append('''timed out'''						)

					return {
					    "task_id": task_id,
					    "passed": result[0] == "passed",
					    "result": result[0],
					    "completion_id": completion_id,
					}
def 					_snake_case	(  __snake_case  ,     __snake_case  ,     __snake_case						):
					with create_tempdir():
										# These system calls are needed when cleaning up tempdir.
										import os
										import shutil

										_UpperCamelCase			     =     shutil.rmtree
										_UpperCamelCase			     =     os.rmdir
										_UpperCamelCase			     =     os.chdir

										# Disable functionalities that can make destructive changes to the test.
										reliability_guard()

										# Run program.
										try:
															_UpperCamelCase			     =     {}
															with swallow_io():
																				with time_limit(__snake_case						):
																									exec(__snake_case  ,     __snake_case						)
															result.append('''passed'''						)
										except TimeoutException:
															result.append('''timed out'''						)
										except BaseException as e:
															result.append(f"""failed: {e}"""						)

										# Needed for cleaning up.
										_UpperCamelCase			     =     rmtree
										_UpperCamelCase			     =     rmdir
										_UpperCamelCase			     =     chdir
@contextlib.contextmanager
def 					_snake_case	(  __snake_case						):
					def signal_handler(__snake_case  ,     __snake_case						):
										raise TimeoutException('''Timed out!'''						)

					signal.setitimer(signal.ITIMER_REAL  ,     __snake_case						)
					signal.signal(signal.SIGALRM  ,     __snake_case						)
					try:
										yield
					finally:
										signal.setitimer(signal.ITIMER_REAL  ,     0						)
@contextlib.contextmanager
def 					_snake_case	(  ):
					_UpperCamelCase			     =     WriteOnlyStringIO()
					with contextlib.redirect_stdout(__snake_case						):
										with contextlib.redirect_stderr(__snake_case						):
															with redirect_stdin(__snake_case						):
																				yield
@contextlib.contextmanager
def 					_snake_case	(  ):
					with tempfile.TemporaryDirectory() as dirname:
										with chdir(__snake_case						):
															yield dirname
class     lowerCAmelCase_     (       __lowercase ):
							pass




class     lowerCAmelCase_     (       io.StringIO ):







							def  UpperCamelCase_						(   self      :     str ,			*_A      :     Tuple ,			**_A      :     int		):
												raise OSError







							def  UpperCamelCase_						(   self      :     int ,			*_A      :     List[Any] ,			**_A      :     Optional[Any]		):
												raise OSError







							def  UpperCamelCase_						(   self      :     Optional[int] ,			*_A      :     Any ,			**_A      :     Dict		):
												raise OSError







							def  UpperCamelCase_						(   self      :     int ,			*_A      :     Tuple ,			**_A      :     str		):
												return False




class     lowerCAmelCase_     (       contextlib._RedirectStream ):  # type: ignore
							UpperCAmelCase				   =     "stdin"




@contextlib.contextmanager
def 					_snake_case	(  __snake_case						):
					if root == ".":
										yield
										return
					_UpperCamelCase			     =     os.getcwd()
					os.chdir(__snake_case						)
					try:
										yield
					except BaseException as exc:
										raise exc
					finally:
										os.chdir(__snake_case						)







def 					_snake_case	(  __snake_case=None						):

					if maximum_memory_bytes is not None:
										import resource

										resource.setrlimit(resource.RLIMIT_AS  ,     (maximum_memory_bytes, maximum_memory_bytes)						)
										resource.setrlimit(resource.RLIMIT_DATA  ,     (maximum_memory_bytes, maximum_memory_bytes)						)
										if not platform.uname().system == "Darwin":
															resource.setrlimit(resource.RLIMIT_STACK  ,     (maximum_memory_bytes, maximum_memory_bytes)						)

					faulthandler.disable()

					import builtins

					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None

					import os

					_UpperCamelCase			     =     '''1'''

					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None

					import shutil

					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None

					import subprocess

					_UpperCamelCase			     =     None  # type: ignore

					_UpperCamelCase			     =     None

					import sys

					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None
					_UpperCamelCase			     =     None






"""simple docstring"""

def 		_snake_case	(   _snake_case				:   int							,    _snake_case				:   int				)       ->   int:






      '''simple docstring'''


      return int((input_a, input_a).count(1				) != 0				)






def 		_snake_case	(   )       ->   None:






      '''simple docstring'''


      assert or_gate(0							,    0				) == 0
      assert or_gate(0							,    1				) == 1
      assert or_gate(1							,    0				) == 1
      assert or_gate(1							,    1				) == 1


if __name__ == "__main__":
       print(or_gate(0, 1))
       print(or_gate(1, 0))
       print(or_gate(0, 0))
       print(or_gate(1, 1))

