結果

問題 No.8045 怪文書
ユーザー ttttan
提出日時 2019-04-01 22:00:30
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 197 bytes
コンパイル時間 1,245 ms
コンパイル使用メモリ 157,520 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-11-27 02:43:11
合計ジャッジ時間 23,738 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 13 TLE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,m;cin>>n>>m;
    long long ans=1;
    for(int i=1;i<=n;i++){
        ans*=i;
        ans%=m;
        
    }
    cout<<ans<<endl;
}
0