Solution:
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n, t, v, sum=0;
cin>>n;
while(n--)
{
cin>>t>>v;
sum+=(t*v);
}
cout<<sum<<endl;
return 0;
}
Code · Faith · Curiosity
c �� 2023-01-06 10:49:16
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n, t, v, sum=0;
cin>>n;
while(n--)
{
cin>>t>>v;
sum+=(t*v);
}
cout<<sum<<endl;
return 0;
}
Post Visited: 73 times
Categories: c
No comments yet. Be the first to comment!