10786 - Progression
raw download clone
C
views 20
,
size 245 b
#include <stdio.h>

int main(void)
{
    int a, b, c;

    scanf("%d%d%d", &a, &b, &c);
    if(b - a == c - b)
        printf("%d %d", 2 * a - b, c + b - a);
    else
        printf("%d %d", a * a / b, c * b / a);

    return 0;
}
close fullscreen
Login or Register to edit or fork this paste. It's free.