Advertisement
rdsedmundo

Garcom.c

Jan 9th, 2014
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     int n, i;
  5.     scanf("%d", &n);
  6.  
  7.     int Quebrou = 0;
  8.  
  9.     for(i = 0; i < n; i++) {
  10.         int L, C;
  11.         scanf("%d %d", &L, &C);
  12.  
  13.         if(L > C)
  14.             Quebrou += C;
  15.     }
  16.  
  17.     printf("%d\n", Quebrou);
  18.  
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement