Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- int main(){
- int k = 1;
- while(true){
- int n;
- scanf("%d", &n);
- if(n == 0) break;
- printf("Teste %d\n", k++);
- int c1 = 0;
- int c2 = 0;
- for(int i = 0; i < n; i++){
- int d1, d2;
- scanf("%d %d", &d1, &d2);
- c1 += d1;
- c2 += d2;
- printf("%d\n", c1-c2);
- }
- printf("\n");
- }
- }
Add Comment
Please, Sign In to add comment