結果
問題 | No.502 階乗を計算するだけ |
ユーザー |
![]() |
提出日時 | 2024-07-29 18:41:44 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,198 bytes |
コンパイル時間 | 5,968 ms |
コンパイル使用メモリ | 334,344 KB |
実行使用メモリ | 13,888 KB |
最終ジャッジ日時 | 2024-07-29 18:41:58 |
合計ジャッジ時間 | 9,907 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 32 TLE * 1 -- * 19 |
ソースコード
#ifndef LOCAL #include <atcoder/all> #include <bits/stdc++.h> #else #include <local.h> #endif using namespace std; using namespace atcoder; using mint = modint998244353; using mint1 = modint1000000007; using std::cin; using std::cout; #define fi first #define se second #define endl '\n' #define pb(a) push_back(a) #define eb(a) emplace_back(a) #define ppf() pop_front() #define ppb() pop_back() z #define pp() pop() #define mp(f, s) make_pair(f, s) #define A(a) begin(a), end(a) #define vc vector template <class f> using vv = vector<vector<f>>; template <class f> using v3 = vector<vector<vector<f>>>; #define pq priority_queue template <class f> using pqg = priority_queue<f, vc<f>, greater<f>>; using uint = uint32_t; using ll = int64_t; using ull = uint64_t; using vi = vc<int>; using vl = vc<ll>; using vb = vc<bool>; using pi = pair<int, int>; using str = string; using vs = vc<str>; const str yes = "Yes\n", no = "No\n"; constexpr int dx[] = {-1, 0, 0, 1, -1, 1, -1, 1}; constexpr int dy[] = {0, -1, 1, 0, -1, -1, 1, 1}; int main() { cin.tie(0)->sync_with_stdio(0); ll n;cin>>n; if(n>=1e9+7)cout<<0<<endl; else{ mint1 a=1; for(int i=1;i<=n;i++) a*=i; cout<<a.val()<<endl; } }