#include<stdio.h>
int main()
{
int t;
scanf("%d", &t);
while (t--)
{
int P, score100, score1, problems_solved;
scanf("%d", &P);
score100 = P / 100;
score1 = P % 100;
problems_solved = (score100) + score1;
if ( problems_solved <= 10)
{
int problems_solved_new = problems_solved ;
printf("%d\n", problems_solved_new);
} else
{
printf("-1\n");
}
}
return 0;
}
actually the thing is when i’m sending it its making some changes like in printf and scanf " " and instead of t-- in while loop its making t- only that is why its making error.
for more clarity please refer this its the same code ss.
hey thanks for the help and i’ve noticed those errors and i’ve corrected them, the actual thing is either with the time complexity or the ide bug. thanks for the help