結果

問題 No.8045 怪文書
ユーザー xuzijian629
提出日時 2019-04-01 21:41:10
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 210 bytes
コンパイル時間 1,652 ms
コンパイル使用メモリ 192,360 KB
最終ジャッジ日時 2025-01-07 00:55:17
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 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 << endl;
}
0