Skip to content

Instantly share code, notes, and snippets.

@michael34435
Last active December 11, 2015 07:04
Show Gist options
  • Save michael34435/42035c730de1118588dd to your computer and use it in GitHub Desktop.
Save michael34435/42035c730de1118588dd to your computer and use it in GitHub Desktop.
# coding: utf-8
# 自分の得意な言語で
# Let's チャレンジ!!
N = input()
if N >= 1 and N <= 1000000:
data = 1
for i in range(1, N + 1):
data *= i
print str(data).rstrip('0')[::-1][0:9:][::-1].lstrip('0')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment