Submission #18764968
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
bool ok[12];
int main(){
long long l;
cin >> l;
long long ans = 1;
for(long long i = l-1;i>l-12;i--){
ans*=i;
for(long long j = 2;j<=11;j++){
if(!ok[j] && ans%j == 0){
ans/=j;
ok[j] = 1;
}
}
}
cout <<ans;
}
Submission Info
| Submission Time | |
|---|---|
| Task | C - Duodecim Ferra |
| User | FatihSolak |
| Language | C++ (GCC 9.2.1) |
| Score | 300 |
| Code Size | 373 Byte |
| Status | AC |
| Exec Time | 7 ms |
| Memory | 3632 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 300 / 300 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | handmade_00.txt, handmade_01.txt, handmade_02.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, sample_01.txt, sample_02.txt, sample_03.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| handmade_00.txt | AC | 7 ms | 3528 KiB |
| handmade_01.txt | AC | 2 ms | 3548 KiB |
| handmade_02.txt | AC | 3 ms | 3596 KiB |
| random_00.txt | AC | 2 ms | 3528 KiB |
| random_01.txt | AC | 3 ms | 3432 KiB |
| random_02.txt | AC | 2 ms | 3596 KiB |
| random_03.txt | AC | 3 ms | 3408 KiB |
| random_04.txt | AC | 4 ms | 3520 KiB |
| random_05.txt | AC | 2 ms | 3632 KiB |
| random_06.txt | AC | 2 ms | 3584 KiB |
| random_07.txt | AC | 2 ms | 3620 KiB |
| random_08.txt | AC | 2 ms | 3564 KiB |
| random_09.txt | AC | 3 ms | 3404 KiB |
| sample_01.txt | AC | 2 ms | 3620 KiB |
| sample_02.txt | AC | 2 ms | 3528 KiB |
| sample_03.txt | AC | 2 ms | 3592 KiB |