General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
52744967 Practice:
Naman_Bhalla
235A - 28 GNU C++17 Accepted 62 ms 4 KB 2019-04-14 14:09:57 2019-04-14 14:09:57
 
 
→ Source
//
// Created by Naman Bhalla on 2019-04-14.
//

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#include <utility>

using namespace std;

int main(){
    long long int n;
    cin >> n;

    if(n == 1){
        cout << 1 << endl;
    } else if(n == 2){
        cout << 2 << endl;
    } else if(n == 3) {
        cout << 6 << endl;
    } else if(n % 2 != 0){
        cout << n * (n - 1) * (n - 2) << endl;
    } else if(n % 3 != 0){
        cout << n * (n - 1) * (n - 3) << endl;
    } else {
        cout << (n - 1) * (n - 2) * (n - 3) << endl;
    }
    return 0;
}
 
 
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details