Thursday, April 14, 2016

Published April 14, 2016 by with 1 comment

UVA Problem 10300: Ecological Premium -Solution

#include <stdio.h>
int main ()
{
    int n, f,a,b,c;
    scanf("%d",&n);
    while (n--)
    {
        int premium=0;
        scanf("%d",&f);
        while (f--)
        {
            scanf("%d%d%d",&a,&b,&c);
            premium= premium+(a*c);
        }
        printf("%d\n",premium);
    }
    return 0;
}
      edit

1 comment:

  1. Why there is no comment in the program?
    It may help one for better understanding

    ReplyDelete