UVa-Ecological Premium
#include <iostream> using namespace std; int main() { int a,b,c; int n,f; while(cin>>n) { while(n--) { cin>>f; int sum=0; while(f--) { cin>>a>>b>>c; sum+=a*c; } cout<<sum<<endl; } } return 0; }
补充:软件开发 , C++ ,
#include <iostream> using namespace std; int main() { int a,b,c; int n,f; while(cin>>n) { while(n--) { cin>>f; int sum=0; while(f--) { cin>>a>>b>>c; sum+=a*c; } cout<<sum<<endl; } } return 0; }
补充:软件开发 , C++ ,