結果

問題 No.500 階乗電卓
ユーザー hint908
提出日時 2024-04-18 19:07:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 392 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-10-10 12:29:22
合計ジャッジ時間 1,912 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

a = int(input())

if a>=50: print("000000000000")
else:
	ans = 1;
	for i in range(a):
		ans *= (i+1)
	if ans < 1000000000000: print(ans)
	else:
		ans %= 1000000000000
		ans = str(ans)
		while len(ans) < 12: ans = "0"+ans
		print(ans)
	
0