Follows 621.c (Total 21 lines):

/* @JUDGE_ID:4461XX 621 C */
/* A */
#include <stdio.h>

void main( void )
{
	int i , n ;
	char a[256] ;
	scanf( "%d" , &n ) ;
	for( i=0 ; i<n ; i++ ){
		scanf( "%s" , a ) ;
		if( strcmp( "1" , a )==0 || strcmp( "4" , a )==0 || strcmp( "78" , a )==0 )
			printf( "+\n" ) ;
		else if ( a[strlen( a )-1]=='5' && a[strlen( a )-2]=='3' )
			printf( "-\n" ) ;
		else if ( a[0]=='9' && a[strlen( a )-1]=='4' )
			printf( "*\n" ) ;
		else if ( a[0]=='1' && a[1]=='9' && a[2]=='0' )
			printf( "?\n" ) ;
	}
}

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