結果

問題 No.502 階乗を計算するだけ
ユーザー 伊藤光
提出日時 2024-04-23 17:02:49
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 182 bytes
コンパイル時間 208 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 61,696 KB
最終ジャッジ日時 2024-10-15 17:35:02
合計ジャッジ時間 4,628 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 32 TLE * 1 -- * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

def frac(n,mod):
    a  = 1
    for i in range(2,n+1):
        a *= i
        a %= mod
    return a

if n > 10**9 + 7:
    print(0)
else:
    print(frac(n,10**9+7))
0