結果
| 問題 | No.502 階乗を計算するだけ |
| コンテスト | |
| ユーザー |
y_taira_c
|
| 提出日時 | 2017-06-21 22:52:51 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 410 bytes |
| 記録 | |
| コンパイル時間 | 431 ms |
| コンパイル使用メモリ | 103,916 KB |
| 実行使用メモリ | 10,036 KB |
| 最終ジャッジ日時 | 2026-09-08 22:17:51 |
| 合計ジャッジ時間 | 31,037 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 TLE * 9 -- * 9 |
ソースコード
#include <future>
#include <iostream>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int x;
cin >> x;
unsigned long long int res = 1;
thread t = thread([&res](int x)
{
for (int i = x; i > 0; i--)
{
res *= i;
res %= 1000000007;
}
},x/2);
t.join();
for (int i = x; i > x/2; i--)
{
res *= i;
res %= 1000000007;
}
cout << res << "\n";
return 0;
}
y_taira_c