Submission #7464695
Source Code Expand
#include <bits/stdc++.h>
#define REP(i,s,e) for(int i=(s); i<(e);i++)
#define rep(i,n) REP(i,0,n)
#define rep1(i,n) REP(i,1,n)
#define repe(i,n) for(auto &&i:n)
#define all(v) (v).begin(),(v).end()
#define decimal fixed<<setprecision(20)
#define fastcin() cin.tie(0);ios::sync_with_stdio(false)
using namespace std;
using LL = long long;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int INF = 1e9;
const LL LLINF = 1e16;
const int mod = 1000000007;
int main(){
int N;
cin >> N;
LL ans = 1;
for(LL i=1; i<=N; i++){
(ans *= i) %= mod;
}
cout << ans << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Training Camp |
| User | AokabiC |
| Language | C++14 (GCC 5.4.1) |
| Score | 200 |
| Code Size | 763 Byte |
| Status | AC |
| Exec Time | 3 ms |
| Memory | 384 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt |
| All | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 01.txt, 02.txt, 03.txt, 04.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_example_01.txt | AC | 3 ms | 384 KiB |
| 00_example_02.txt | AC | 1 ms | 256 KiB |
| 00_example_03.txt | AC | 2 ms | 256 KiB |
| 01.txt | AC | 1 ms | 256 KiB |
| 02.txt | AC | 1 ms | 256 KiB |
| 03.txt | AC | 2 ms | 256 KiB |
| 04.txt | AC | 2 ms | 256 KiB |