Submission #1868920
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
struct edge {int /*from,*/to,cost;};
typedef long long ll;
typedef pair<int,int> P;
typedef pair<pair<int,int>,int> PP;
typedef vector<int> VI;
typedef vector<long long int> VL;
typedef vector<edge> VE;
static const int MOD = 1000000007;
static const int INF = 2147483647;
//static const long long INF = 9223372000000000000;
//static const long long INF = 9223372000000000000/2;
//static const int INF = 1000010000;
//int dx4[4] = {0,1,0,-1}, dy4[4] = {-1,0,1,0};
//int dx5[5] = {-1,0,0,0,1}, dy5[5] = {0,-1,0,1,0};
//int dx8[8] = {-1,0,1,1,1,0,-1,-1}, dy8[8] = {1,1,1,0,-1,-1,-1,0};
//int dx9[9] = {-1,0,1,1,1,0,-1,-1,0}, dy9[9] = {1,1,1,0,-1,-1,-1,0,0};
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define np next_permutation
#define pq priority_queue
#define SZ(a) int((a).size())
#define LEN(a) int((a).length())
#define MAX(a,b,c) max((a),max((b),(c)))
#define MIN(a,b,c) min((a),min((b),(c)))
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define REP1(i,x) for(int i=1;i<=(int)(x);i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RREP1(i,x) for(int i=((int)(x));i>0;i--)
//#define int ll
int fact[114514];
void f(){
fact[0] = fact[1] = 1;
REP1(i,114513){
fact[i] = (fact[i-1] * i) % MOD;
}
}
signed main(){
int n;
scanf("%d",&n);
f();
printf("%d\n",fact[n]);
return 0;
}
Submission Info
Submission Time
2017-12-13 17:07:10+0900
Task
B - Training Camp
User
r67pr
Language
C++14 (GCC 5.4.1)
Score
0
Code Size
1592 Byte
Status
WA
Exec Time
2 ms
Memory
640 KB
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:50:19: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^
Judge Result
Set Name
Sample
All
Score / Max Score
0 / 0
0 / 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
2 ms
640 KB
00_example_02.txt
AC
2 ms
640 KB
00_example_03.txt
WA
2 ms
640 KB
01.txt
WA
2 ms
640 KB
02.txt
AC
2 ms
640 KB
03.txt
WA
2 ms
640 KB
04.txt
WA
2 ms
640 KB