반응형
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
반응형
'나는 이렇게 학습한다 > Algorithm & SQL' 카테고리의 다른 글
0113. Build a square (0) | 2023.01.13 |
---|---|
0112. Tip Calculator (0) | 2023.01.13 |
0110. altERnaTIng cAsE <=> ALTerNAtiNG CaSe (0) | 2023.01.11 |
0109. A Needle in the Haystack (0) | 2023.01.09 |
0108. How many lightsabers do you own? (0) | 2023.01.09 |