mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
9 lines
168 B
C++
9 lines
168 B
C++
|
#include <stdio.h>
|
||
|
int main(){
|
||
|
int n;
|
||
|
while(~scanf("%d",&n)){
|
||
|
printf("%d\n",n*n*(n-1)/2*(n*n*n-2)+n*n*n*(n*n-5)/2+2*n*n);
|
||
|
}
|
||
|
return 0;
|
||
|
}
|