Uva 10300 – Ecological Premium

Problem:-http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=1241

Solution :-

#include<stdio.h>
int main()
{
long long a,t,n,b,c,i,j,s;
while(scanf(“%lld”,&t)==1)
{
for(i=0;i<t;i++)
{
s=0;
scanf(“%lld”,&n);
for(j=0;j<n;j++)
{
scanf(“%lld %lld %lld”,&a,&b,&c);
s+=a*c;
}
printf(“%lldn”,s);
}
}
return 0;
}
At First you can try to solve this problem if you can’t than see this code & find what’s your problem . If you copy paste this code you could not improve yourself in programming .

Posted by Shipu Ahamed

2 comments

this code not run.
Please avoid copy pasting …

Leave a Reply