Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- int n, i;
- scanf("%d", &n);
- int dist_total = 0;
- for(i = 0; i < n; i++) {
- int T, V;
- scanf("%d %d", &T, &V);
- dist_total += V * T;
- }
- printf("%d\n", dist_total);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement