Project Euler にチャレンジ:Problem 4 C言語での解答

← Problem 3  
#include<stdio.h>

int main(void)
{
	int i = 0,j = 0 , k = 0 ,  answer = 0;
	for(i = 100;i <1000;i++)
	{
		for(j = 100;j <1000;j++)
		{
			k = i * j ;
			if( k >= 100000 && (int)(k / 100000) == k % 10 && (int)((k % 100000)/10000) == (int)((k % 100)/10) && (int)((k % 10000)/1000) == (int)(k % 1000/100))
			{
				if(answer < k)
				{
					answer = k;
				}
			}
		}
	}
	printf("%d",answer);
}
問題文