Follows 256.c (Total 34 lines):

/* @JUDGE_ID:4461XX 256 C */
/* A */
#include <stdio.h>
int n ;
unsigned long number ;
void print( unsigned long p )
{
	int times ;
	unsigned long num=number/10 ;
	if( !p )
		for( times=1 ; times<=n/2 ; times++ ) printf( "0" ) ;
	else{
		while( p<num ){
			printf( "0" ) ;
			num /= 10 ;
		}
		printf( "%lu" , p ) ;
	}
}
void main( void )
{
	unsigned long i , j , s ;
	while( scanf( "%d" , &n ) == 1 ){
		number = 1 ;
		for( i=1 ; i<=n/2 ; i++ ) number *= 10 ;
		for( i=0 ; i<number ; i++ )
			for( j=0 ; j<number ; j++ )
				if( ( i + j ) * ( i + j ) == i * number + j ){
					print( i ) ;
					print( j ) ;
					printf( "\n" ) ;
				}
	}
}

Back to statistics
Ya-Lin Huang (C)
huangyl@gmail.com