#include <stdio.h>
typedef long long ll;
int main(){ // 从1~n中任选出三个数,他们的最小公倍数最大为多少
ll n, max = 0;
scanf("%d",&n);
if(n<=2) max = n;
else if(n % 2 != 0) max = n * (n-1) * (n-2);
else {
if(n % 3 == 0) max = (n-1) * (n-2) * (n-3);
else max = n * (n-1) * (n-3);
}
printf("%lld",max);
return 0;
}
ALGO-2 最大最小公倍数
最新推荐文章于 2021-04-02 09:39:48 发布