나는 이렇게 학습한다/Algorithm & SQL

0111. You Can't Code Under Pressure #1

daco2020 2023. 1. 12. 00:33
반응형

Code as fast as you can! You need to double the integer and return it.



Solution:

def double_integer(i: int) -> int:
    try: return i ** 2 // (i / 2)
    except: return 0
def doubleInteger(i: int) -> int:
    return i << 1


반응형