Help me in solving LBC18 problem

My issue

My output for the last input does matched it is actually 1185 but my output is 1200.
please help me to make it correct.

My code

// Update the code below to solve this problem

#include <iostream>
#include <string>
using namespace std;

int main() 
{
  int t;
  cin>>t; 
  while(t--)
  {
  int X, Y, Z;
  cin>>X>>Y>>Z;
  if(X<=3){
      cout<<X*Y<<endl;
  }
  else{
      int m=(X/3)*Z;
      cout<< m + (X*Y)<<endl;
  }
  
   }
return 0;
}

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