My issue
for 3rd test case. 3 digit number , 105 should be answer, instead of 123
My code
#include<stdio.h>
#include<math.h>
int main()
{
int test;
scanf("%d",&test);
while(test--)
{
int a,b,c;
scanf("%d", &c);
if(c==1)
{
printf("3\n");
}
else
{
a= pow(10,(c-1));
b= pow(10,c);
for(;a<b;a++)
{
if(a%3==0 && a%9!=0 && a%2==1)
{
printf("%d \n",a);
break;
}
}
}
}
}
Learning course: Jump from 2* to 3*
Problem Link: Practice Problem in - CodeChef