Submission #1687877


Source Code Expand

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>

#define INF 1e9;
//#define mod 1e9+7

//#define max(x,y) (x>y)?x:y
//#define min(x,y) (x<y)?x:y
#define rep(i,j,k) for(int i=j;i<k;i++)
#define repp(i,j,k) for(int i=j;i>=k;i--)
#define mi(n) (int*)malloc(sizeof(int)*n);
#define mc(n) (char*)malloc(sizeof(char)*n);

using namespace std;
int mod=1000000007;

int main(){
   int n;
   long long p=1;
   cin>>n;
   int i;
   rep(i,1,n+1){
       p=(p*=i)%mod;
   }
   
   cout<<p<<endl;


    return 0;
}

Submission Info

Submission Time
Task B - Training Camp
User gotutiyan
Language C++14 (GCC 5.4.1)
Score 200
Code Size 561 Byte
Status AC
Exec Time 3 ms
Memory 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 7
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 1 ms 256 KB
00_example_02.txt AC 1 ms 256 KB
00_example_03.txt AC 3 ms 256 KB
01.txt AC 1 ms 256 KB
02.txt AC 1 ms 256 KB
03.txt AC 3 ms 256 KB
04.txt AC 2 ms 256 KB