結果

問題 No.8045 怪文書
ユーザー ats5515
提出日時 2019-04-01 21:27:09
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 424 bytes
コンパイル時間 714 ms
コンパイル使用メモリ 80,864 KB
実行使用メモリ 13,640 KB
最終ジャッジ日時 2024-11-26 11:04:18
合計ジャッジ時間 23,086 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 13 TLE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <stdio.h>
using namespace std;
#define int long long
int MOD = 1000000007;
signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N, M;
	cin >> N >> M;

	int res = 1;
	for (int i = 1; i <= N; i++) {
		res = (res * i)%M;
	}
	cout << res << endl;
}
0