結果

問題 No.3045 怪文書
ユーザー DenteDente
提出日時 2019-04-01 22:24:14
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 332 bytes
コンパイル時間 709 ms
コンパイル使用メモリ 80,292 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-05 08:15:24
合計ジャッジ時間 5,954 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 WA -
testcase_09 AC 1 ms
5,376 KB
testcase_10 WA -
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 571 ms
5,376 KB
testcase_14 AC 185 ms
5,376 KB
testcase_15 AC 49 ms
5,376 KB
testcase_16 AC 534 ms
5,376 KB
testcase_17 AC 1,005 ms
5,376 KB
testcase_18 AC 255 ms
5,376 KB
testcase_19 AC 1,011 ms
5,376 KB
testcase_20 AC 996 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#define REP(i,a) for(int i = 0; i < (a); i++)
using namespace std;

int main(){
	long long n,m;
	cin >> n >> m;
	long long res = 1;
    for(long long i = 1; i <= n; i++)res *= i;
	cout << res % m << endl;
}
0