Accepted solution

URI 1079 Solution

Open original problem
Source code

#include <stdio.h>

int main()

{

    int i,j,N;

    double a,b,c;

    scanf("%d",&N);

        for(i=0; i<N; i++)

        {

            scanf("%lf %lf %lf",&a,&b,&c);

            printf("%.1lf
",((a*2)+(b*3)+(c*5))/10);

        }

    return 0;

}
Join the discussion

Add your comment