水题,主要考察了一个数学公式;
#include<stdio.h>int main()
{
int m,k;
double n;
while(scanf("%d",&m),m)
{
n=1.0*m*(m+1)*(m+2)/6.0;
k=0;
while(n>=10)
{
n=n/10;
k++;
}
printf("%.2lfE%d\n",n,k);
}
return 0;
}
=10) { _hdu1178"> =10) {">
水题,主要考察了一个数学公式;
#include<stdio.h>
565

被折叠的 条评论
为什么被折叠?
Heritage from father&spm=1001.2101.3001.5002&articleId=9715393&d=1&t=3&u=1daeeead5a124ed8960d2a977caf3c47)