How do I make this efficient?#include <stdio.h>#define MAX 1000000000int main(){    int n,temp,prod,i,j=0;    scanf(%d,&n);    for(i=1;i<MAX;i++)    {        temp=i;        prod=1;        while(temp!=0)        {           prod=prod*(temp%10);           temp=temp/10;        }        if(prod==n)        {            printf(%d,i);            j=1;            break;        }    }    if(j==0)    {        printf(-1);    }    return 0;}
Find the smallest number Q whose product of digits is N
c