Skip to content

Instantly share code, notes, and snippets.

@NoviceDuke
Last active May 4, 2016 11:30
Show Gist options
  • Save NoviceDuke/e8c8ece48ce6b1fddaa79e6c3d051723 to your computer and use it in GitHub Desktop.
Save NoviceDuke/e8c8ece48ce6b1fddaa79e6c3d051723 to your computer and use it in GitHub Desktop.
#include<iostream>
using namespace std ;
int main ()
{
int icase , ifarmers , isize , ianimals , ivalue , ipremium ;
cin >> icase ;
while( icase -- )
{
cin >> ifarmers ;
ipremium = 0 ;
while( ifarmers -- )
{
cin >> isize >> ianimals >> ivalue ;
ipremium = ipremium + isize * ivalue ;
}
cout << ipremium << endl ;
}
return 0 ;
}
@NoviceDuke
Copy link
Author

Uva 10300-Ecological Premium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment