結果

問題 No.500 階乗電卓
コンテスト
ユーザー bellangeldindon
提出日時 2019-05-10 15:41:26
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 286 bytes
記録
コンパイル時間 266 ms
コンパイル使用メモリ 77,460 KB
最終ジャッジ日時 2025-12-04 01:43:38
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 15 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(raw_input())
ans = ''
if N >= 50: ans = '000000000000'
else:
	fact = 1
	flag = False
	for i in range(1, N+1):
		fact = fact * i
		if fact >= 1000000000000:
			flag = True
	ans = str(fact)
	if flag and len(ans) < 12:
		for i in range(0, 12-len(ans)):
			ans = '0' + ans
print ans
0