結果

問題 No.8045 怪文書
ユーザー xuzijian629
提出日時 2019-04-01 21:41:37
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 214 bytes
コンパイル時間 2,181 ms
コンパイル使用メモリ 192,368 KB
最終ジャッジ日時 2025-01-07 00:56:03
ジャッジサーバーID
(参考情報)
judge2 / 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;
    int ans = 1;
    for (int i = 2; i <= n; i++) {
        ans = 1ll * ans * i % m;
    }
    cout << ans % m << endl;
}
0