Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- long long int t,n,a,b,c,d,sum;
- scanf("%lld",&t);
- while(t--)
- {
- sum=0;
- scanf("%lld",&n);
- while(n--)
- {
- scanf("%lld%lld%lld",&a,&b,&c);
- d=a*c;
- sum=sum+d;
- }
- printf("%lld\n",sum);
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment