結果

問題 No.500 階乗電卓
ユーザー bellangeldindon
提出日時 2019-05-10 15:41:26
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 286 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-02 01:00:05
合計ジャッジ時間 1,225 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 15 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

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