Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int i, j, N, t, correct = 0, miss = 0;
  5. char s[101];
  6. scanf("%d", &N);
  7. for(i = 1;i <= N;i++){
  8. scanf("%d%s", &t, s);
  9. j = 0;
  10. while(s[j] != '\0'){
  11. j++;
  12. }
  13. if(12 * t / 1000 >= j)correct += j;
  14. else{
  15. correct += 12 * t / 1000;
  16. miss += j - 12 * t / 1000;
  17. }
  18. }
  19. printf("%d %d\n", correct, miss);
  20.  
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement