其他分享
首页 > 其他分享> > poj 2583(水题)

poj 2583(水题)

作者:互联网

#include<iostream>
using namespace std;
int main(){
    double a,b,c,f0,f1,f2,f3,f4,f5;
    while(scanf("%lf%lf%lf",&f0,&f1,&f2)==3){
        c = f0;
        a = (f2-2*f1+f0)/2.0;
        b = f1-f0-a;
        f3 = 9*a+3*b+c;
        f4 = 16*a+4*b+c;
        f5 = 25*a+5*b+c;
        printf("%.0lf %.0lf %.0lf\n",f3,f4,f5);
    }
    return 0;
}

 

标签:f0,f1,f2,f3,2583,f5,水题,poj,f4
来源: https://www.cnblogs.com/stevenzrx/p/15620037.html