sw expert academy-2019. 더블더블-python

cosmos·2022년 5월 7일
0
post-thumbnail
post-custom-banner

코드

# https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=1&contestProbId=AV5QDEX6AqwDFAUq&categoryId=AV5QDEX6AqwDFAUq&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=PYTHON&select-1=1&pageSize=10&pageIndex=2
# sw expert academy, d1: 2019. 더블더블, python3
def solve(n: int) -> list:
    result = [1]

    for x in range(n):
        result.append(result[-1] * 2)

    return result
if __name__ == '__main__':
    n = int(input())

    print(*solve(n))

결과

출처 & 깃허브

2019. 더블더블
GITHUB

post-custom-banner

0개의 댓글