본문 바로가기
알고리즘

[알고리즘] Extra Long Factorials

by 혀나Lee 2019. 7. 24.

해커랭크 문제. Extra Long Factorials

#!/bin/python3

import math
import os
import random
import re
import sys

# Complete the extraLongFactorials function below.
def extraLongFactorials(n):
    total = 1
    while n > 1:
        total = total * n
        n -= 1
    print(total)

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

    extraLongFactorials(n)

댓글