結果
問題 | No.502 階乗を計算するだけ |
ユーザー |
|
提出日時 | 2017-04-07 22:46:59 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 884 bytes |
コンパイル時間 | 697 ms |
コンパイル使用メモリ | 82,536 KB |
実行使用メモリ | 13,756 KB |
最終ジャッジ日時 | 2024-07-16 02:43:53 |
合計ジャッジ時間 | 5,235 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 30 TLE * 2 -- * 18 |
ソースコード
#include<iostream>#include<cstdio>#include<cmath>#include<cstdlib>#include<cstring>#include<string>#include<stack>#include<queue>#include<vector>#include<algorithm>#include <iomanip>typedef long long int ll;using namespace std;#define FOR(i,a,b) for (int i=(a);i<(b);i++)#define REP(i,n) for (int i=0;i<(n);i++)#define EREP(i,n) for (int i=1;i<=(n);i++)#define EVEL 1#ifndef EVEL#define DEB(X) cout << #X << ":" <<X<<" " ;#define TF(f) f ? cout<<"true " : cout<<"false ";#define END cout<<"\n";#else#define DEB(X) {X=X;}#define TF(f) {f=f;}#define END {}#endifconst int MOD = 1000000007;const int INF = 1000000;#define NMAX 50#define MAX 10string sev="0";int main(){ll N,ans=1;ios_base::sync_with_stdio(false);cin>>N;for(int i=1;i<=N/2;i++){ans*=(i*(N-i)%MOD);ans%=MOD;}cout<<ans<<endl;}