結果

問題 No.500 階乗電卓
ユーザー newlife171128
提出日時 2018-01-06 21:04:49
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 411 bytes
コンパイル時間 641 ms
コンパイル使用メモリ 73,888 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-23 08:54:24
合計ジャッジ時間 1,596 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cmath>
#include <stack>
#include <cctype>
using namespace std;

int main() {

	int n = 0;
	cin >> n;

	long long sum = 1;
	if (n < 50) {
		for (int i = 1; i <= n; i++) {
			sum = sum * i % 1000000000000;
		}
		cout << sum << endl;
	}else {
		cout<<"000000000000"<<endl;
	}

	return 0;
}
0