Online C++ Compiler

#include <bits/stdc++.h> using namespace std; void threeNumbersWithMaxLCM(int n) { if (n % 2 != 0) { cout << n << " " << (n - 1) << " " << (n - 2); } else if (__gcd(n, (n - 3)) == 1) { cout << n << " " << (n - 1) << " " << (n - 3); }else { cout << (n - 1) << " " << (n - 2) << " " << (n - 3); } cout << endl; } int main() { int n = 18; threeNumbersWithMaxLCM(n); return 0; }