for (int i = 0; i < T; i++) {
int X, N;
scanf("%d %d", &X, &N);
int Total = X * 100;
if (Total >= N) {
printf("0\n");
} else {
int extra = (N - Total + 99) / 100;
printf("%d\n",extra);
}
}
return 0;
You need to round up the values. When you already have 3 planes but want to carry 523 passengers, you have 223 passengers extra. You can just do 223//100, because then 23 passengers will be left out, instead you need to round up the value to the nearest integer.