Follows 10300.c (Total 26 lines):

/* @JUDGE_ID:4461XX 10300 C "@O@ ... too easy" */
/* A */

#include<stdio.h>

void toDo( void )
{
	int farmers , a , b , c , sum ;

	scanf( "%d" , &farmers ) ;
	for( sum=0 ; farmers ; --farmers ){
		scanf( "%d %d %d" , &a , &b , &c ) ;
		sum += a*c ;
	}

	printf( "%d\n" , sum ) ;
}
int main( void )
{
	int cases ;

	scanf( "%d" , &cases ) ;
	for( ; cases ; --cases ) toDo() ;

	return 0 ;
}

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