ACM (TJU) : 2056


// http://acm.tju.edu.cn/toj/showp2056.html

#include <stdio.h>

int main ()
{
    int f0;
    int f1;
    int f2;

    while ( scanf ("%d %d %d", &f0, &f1, &f2) != EOF ) {
        int a = (f2 - 2 * f1 + f0) / 2;
        int b = f1 - f0 - a;
        int c = f0;

        printf ("%d ", a * 3 * 3 + b * 3 + c);
        printf ("%d ", a * 4 * 4 + b * 4 + c);
        printf ("%d\n", a * 5 * 5 + b * 5 + c);
    }

    return 0;
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s