Follows 10008.c (Total 36 lines):

/* @JUDGE_ID:4461XX 10008 C */
/* A */
#include<stdio.h>
#include<ctype.h>
int account[26] , big=0 ;
void initial( void )
{
	int i ;
	for( i=0 ; i<26 ; i++ ) account[i] = 0 ;
}
void input_check( void )
{
	char arr[100] ;
	int i ;
	gets( arr ) ;
	for( i=0 ; arr[i] ; i++ ){
		if( isalpha( arr[i] ) ) account[toupper( arr[i] )-'A']++ ;
		if( account[toupper( arr[i] )-'A'] > big )
			big = account[toupper( arr[i] )-'A'] ;
	}
}
void print( int len )
{
	int i ;
	for( i=0 ; i<26 ; i++ )
		if( account[i] == len ) printf( "%c %d\n" , i+'A' , account[i] ) ;
}
void main( void )
{
	int n ;
	scanf( "%d\n" , &n ) ;
	initial() ;
	for( ; n ; n-- ) input_check() ;
	for( ; big ; big-- ) print( big ) ;
}
/* @END_OF_SOURCE_CODE */

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