結果
問題 | No.8045 怪文書 |
ユーザー |
![]() |
提出日時 | 2019-04-01 21:43:09 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 283 bytes |
コンパイル時間 | 2,126 ms |
コンパイル使用メモリ | 191,992 KB |
最終ジャッジ日時 | 2025-01-07 00:56:25 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main() {int n, m;cin >> n >> m;int ans = 1;if (n >= m) {cout << 0 << endl;return 0;}for (int i = 2; i <= n; i++) {ans = 1ll * ans * i % m;}cout << ans % m << endl;}