Help me in solving LBC21 problem

My issue

i have a query in this is why it is repeating two same outputs again and again how could be resolved.

My code

// Update the code below to solve this problem

#include <iostream>
#include <string>
#include <math.h>
using namespace std;

int main() 
{
  int t;
  cin>>t; 
  while(t--)
  {
  int P;
  cin>>P;
  if(P%100==0){
      cout<<P/100<<endl;
  }
  if(P<=10&&P%1==0){
      cout<<P<<endl;
  }
  if(P%100!=0&&P%100<=10){
      cout<<ceil(P/100)+P%100<<endl;
  }
  if(P%100>10){
      cout<<"-1"<<endl;
  } 
   }
return 0;
}

Learning course: Solve Programming problems using C++
Problem Link: CodeChef: Practical coding for everyone

@ai211003
Your logic is not right .
The logic is if P%100 + P/100 <=10 then print P%100 +P/100
else print -1;