CodeMan
Home
Uva
AtCoder
Codechef
Codeforce
Hackerrank
LeetCode
Devskill
TopCoder
Spoj
Algorithm
Python3
Hackerearth
Uri
C++
Data Structure
Friday, November 11, 2016
Uva 10300 - Ecological Premium
#
include
<
bits/stdc++.h
>
using
namespace
std
;
int
main
()
{
int
n,ad[
3
],i,j;
cin >> n;
while
(n--) {
int
sum=
0
,k;
cin >> k;
while
(k--) {
cin>>ad[
0
]>>ad[
1
]>>ad[
2
];
sum += ad[
0
]*ad[
2
];
}
cout << sum << endl;
}
return
0
;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment