main()
{
int i,j;//i is the base and j is power
int count=0;//total number of such case
for(i=0;i<=10;i++)
{
for(j=0;j<=30;j++)
{
int x=(j*log10(i))+1;//length of i power j
if(j==x) { {count++;}
}
}
}
printf("%d",count);
}
{
int i,j;//i is the base and j is power
int count=0;//total number of such case
for(i=0;i<=10;i++)
{
for(j=0;j<=30;j++)
{
int x=(j*log10(i))+1;//length of i power j
if(j==x) { {count++;}
}
}
}
printf("%d",count);
}
No comments:
Post a Comment