結果
問題 | No.500 階乗電卓 |
ユーザー |
|
提出日時 | 2017-04-08 17:08:58 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 954 bytes |
コンパイル時間 | 682 ms |
コンパイル使用メモリ | 83,004 KB |
実行使用メモリ | 13,880 KB |
最終ジャッジ日時 | 2024-07-17 23:51:55 |
合計ジャッジ時間 | 5,030 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 8 TLE * 1 -- * 4 |
ソースコード
#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 10vector<ll> sev;int main(){ll N,ans=1;ll md=1000000000000;ios_base::sync_with_stdio(false);cin>>N;if(N>=60){cout<<000000000000;}for(int i=N;i>=1;i--){ans*=(i%md);ans%=md;}cout<<ans<<endl;}