[백준10872_파이썬(python)] - 팩토리얼

경이·2022년 1월 24일
0

🔴 문제

팩토리얼


🟡 Sol

N = int(input())
n_factorial = 1 
for i in range(1, N+1):
    n_factorial = n_factorial * i

print(n_factorial)

🟢 풀이

N 팩토리얼 계산하는 하는 기본적인 문제였다.
for문을 사용해서 구해줬다.


🔵 Ref

profile
이사중입니다!🌟https://velog.io/@devkyoung2

0개의 댓글

관련 채용 정보