Help me in solving MAKEDIV3 problem

My issue

why is 105 in 3digit a wrong answer

My code

#include <stdio.h>
#include<math.h>

int main(void) {
      int t;
      scanf("%d",&t);
      int k;
      
      while(t>0)
      {
          t--;
          scanf("%d",&k);
          int x=pow(10,k-1);
          int y=pow(10,k);
          for(int i=x;i<y;i++)
          {
              if(i%2!=0)
              {
                  if(i%3==0)
                  {
                      if(i%9!=0)
                      {
                          printf("%d\n",i);
                          break;
                      }
                  }
              }
          }
      }

}


Learning course: Jump from 2* to 3*
Problem Link: Make it Divisible Practice Problem in Jump from 2* to 3* - CodeChef

@dhrupad23
its not wrong but your brute force approach will give u tle .
the correct is print n-1 times 9 and one time 3.