結果

問題 No.8045 怪文書
ユーザー DenteDente
提出日時 2019-04-01 22:29:05
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 338 bytes
コンパイル時間 605 ms
コンパイル使用メモリ 80,552 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-27 03:24:39
合計ジャッジ時間 6,104 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other AC * 14 WA * 6
権限があれば一括ダウンロードができます

ソースコード

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 - res % m << endl;
}
0