結果
| 問題 |
No.8045 怪文書
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-13 15:33:23 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 2,000 ms |
| コード長 | 223 bytes |
| コンパイル時間 | 2,682 ms |
| コンパイル使用メモリ | 190,636 KB |
| 最終ジャッジ日時 | 2025-01-09 18:03:47 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
using lint=long long;
int main(){
lint n,m; cin>>n>>m;
lint ans=1;
rep(i,min(n,m)) ans=ans*(i+1)%m;
cout<<ans<<'\n';
return 0;
}