a216.
數數愛明明
| From: [1.160.163.220] |
發表日期
:
2014-01-18 12:56
#include <stdio.h>
int main(){
long long int num,f1,ff1,f2,n,d;
while(scanf("%lld", &num)!=EOF){
for(n=1,f1=0,ff1=1,f2=0,d=1;n<=num;n++){
f1=f1+(ff1+(n-1)*d);
f2=f2+f1;
}
printf("%lld %lld\n", f1,f2);
}
return 0;
}