結果

問題 No.500 階乗電卓
ユーザー kurenai3110
提出日時 2017-04-07 22:59:12
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 341 bytes
コンパイル時間 599 ms
コンパイル使用メモリ 58,932 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-16 02:51:57
合計ジャッジ時間 1,486 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;

int main()
{
	long long n;
	cin >> n;

	if (n >= 50)cout << "000000000000" << endl;
	else {
		long long a = 1;
		for (long long i = n; i > 1; i--) {
			a *= i;
			a %= (long long)(1000000000000);
		}
		cout << a << endl;
	}

    return 0;
}

0