結果

問題 No.502 階乗を計算するだけ
ユーザー jj1guj
提出日時 2020-04-19 08:36:53
言語 Fortran
(gFortran 14.2.0)
結果
TLE  
実行時間 -
コード長 273 bytes
コンパイル時間 1,809 ms
コンパイル使用メモリ 30,976 KB
実行使用メモリ 10,496 KB
最終ジャッジ日時 2024-10-04 12:03:22
合計ジャッジ時間 4,795 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 32 TLE * 1 -- * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

program y502
    implicit none
    integer(8)::n,i,ans
    read*,n
    if(n>=10**9+7)then
        print'(i0)',0
    else
        ans=1
        do i=2,n
            ans=ans*i
            ans=mod(ans,10**9+7)
        end do
        print'(i0)',ans
    end if
end program y502
0