結果
問題 | No.500 階乗電卓 |
ユーザー |
|
提出日時 | 2017-04-07 22:28:25 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 273 bytes |
コンパイル時間 | 353 ms |
コンパイル使用メモリ | 6,784 KB |
実行使用メモリ | 6,400 KB |
最終ジャッジ日時 | 2024-06-25 02:48:17 |
合計ジャッジ時間 | 1,292 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#!/usr/bin/python2# -*- coding: utf-8 -*-# †from math import factorial as factn = int(raw_input())if n >= 50:print '0' * 12else:res = fact(n)if res < 10 ** 12:print reselse:res %= 10 ** 12print '{:012d}'.format(res)