uva 10499

来源:互联网 发布:知君本无邪by尼罗 编辑:程序博客网 时间:2024/06/16 09:06
列题意:求增加的面积占表面积的比例,球的表面积是4pi*r^2 ,每分出一块我们就增加表面积2*pi*r^2,然后规律就出来了。。
#include <iostream>#include <cstdio>#include <cstring>using namespace std;int main(){    int n;    while (scanf("%d",&n) != EOF )    {        if ( n < 0 )            break;        else if ( n <= 1)            printf("0%\n");        else printf("%.0lf%\n",(double)25*n);    }    return 0;}


原创粉丝点击