#
# µû¶óÇÏ¸ç ¹è¿ì´Â ÆÄÀ̽ã°ú µ¥ÀÌÅÍ°úÇÐ(»ý´ÉÃâÆÇ»ç 2020)
# 6.12 ÀÚ½ÅÀ» È£ÃâÇÏ´Â Àç±Í ÇÔ¼ö, 163ÂÊ
#
def factorial(n): # n!ÀÇ Àç±ÍÀû ±¸Çö
if n <= 1: # Á¾·á Á¶°ÇÀÌ ¹Ýµå½Ã ÇÊ¿äÇÏ´Ù
return 1
else:
return n * factorial(n - 1) # n * (n-1)! Á¤ÀÇ¿¡ µû¸¥ ±¸Çö
print('4! = ', factorial(4)) # ÀÎÀÚ·Î 4¸¦ ³Ö¾î È£Ãâ