document.write( "Question 1042667: Tom the cat is brushing up his Math skills. He has a bag containing N balls of different colors. Now Tom can randomly pick any even number of balls from the bag. Tom wants to find out the sum of all such combinations of balls that he can pull out from the bag. Given he can pull out at max K balls in one pick. \r
\n" );
document.write( "\n" );
document.write( "Input Format: \r
\n" );
document.write( "\n" );
document.write( "First line contains two space separated numbers N and K \r
\n" );
document.write( "\n" );
document.write( "Output Format: \r
\n" );
document.write( "\n" );
document.write( "The output is the sum of all the combinations of balls he can pull out modulo 10^9+7 i.e. (1000000007)
\n" );
document.write( " \n" );
document.write( "
Algebra.Com's Answer #657813 by ikleyn(52814)![]() ![]() You can put this solution on YOUR website! . \n" ); document.write( "Tom the cat is brushing up his Math skills. He has a bag containing N balls of different colors. \n" ); document.write( "Now Tom can randomly pick any even number of balls from the bag. Tom wants to find out the sum of all such combinations \n" ); document.write( "of balls that he can pull out from the bag. Given he can pull out at max K balls in one pick. \r \n" ); document.write( "\n" ); document.write( "Input Format: \r \n" ); document.write( "\n" ); document.write( "First line contains two space separated numbers N and K \r \n" ); document.write( "\n" ); document.write( "Output Format: \r \n" ); document.write( "\n" ); document.write( "The output is the sum of all the combinations of balls he can pull out modulo 10^9+7 i.e. (1000000007) \n" ); document.write( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "This writing doesn't make sense. \n" ); document.write( "Besides of it, it seems that formulations of two different problems merged mistakenly in one post here.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "Actually, there is a beautiful problem close to this formulation. \n" ); document.write( "But it should be cleaned/rectified and reformulated. \n" ); document.write( "Let me do it below.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( " \r\n" ); document.write( " Tom the cat is brushing up his Math skills. He has a bag containing N balls of different colors. (Which means that the balls are distinguishable).\r\n" ); document.write( "\r\n" ); document.write( " Let N is >= 2.\r\n" ); document.write( "\r\n" ); document.write( " Now Tom can randomly pick any even number of balls from the bag. Tom wants to find out the\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( " \r\n" ); document.write( "OK. Let \"N\" be the number of the balls in the bag.\r\n" ); document.write( "\r\n" ); document.write( "Then Tom wants to find the number \n" ); document.write( " \n" ); document.write( " |