Follows 369.c (Total 22 lines):

/* @JUDGE_ID:4461XX 369 C */
/* A */
#include <stdio.h>
void main(void)
{
	unsigned long a[101][101] ; int i , j , m , n ;
	a[0][0]=1 ;
	for( i=1 ; i<=100 ; i++ )
	{
		a[i][0]=1 ;
		a[i][i]=1 ;
		a[i][1]=i ;
		for( j=2 ; j<i ; j++ )
			a[i][j]=a[i-1][j-1]+a[i-1][j] ;
	}
	while( 1 )
	{
		scanf( "%d %d" , &m , &n ) ;
		if( m==0 && n==0 ) break ;
		printf( "%d things taken %d at a time is %lu exactly.\n" ,  m , n , a[m][n] ) ;
	}
}

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