{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cstyle type\u003d\"text/css\"\u003e\r\nh1,h2,h3,h4,h5,h6{margin-bottom:0;}div.textBG p{margin: 0 0 0.0001pt;}\u003c/style\u003e\r\n\u003cp\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003cp\u003e\r\n\t\u003cimg align\u003d\"right\" hspace\u003d\"10\" src\u003d\"http://uva.onlinejudge.org/external/109/p10943.jpg\" vspace\u003d\"10\" /\u003e Larry is very bad at math - he usually uses a calculator, which worked well throughout college. \u003cspan data-scayt_word\u003d\"Unforunately\" data-scaytid\u003d\"1\"\u003eUnforunately\u003c/span\u003e, he is now struck in a deserted island with his good buddy Ryan after a snowboarding accident. They\u0026#39;re now trying to spend some time figuring out some good problems, and Ryan will eat Larry if he cannot answer, so his fate is up to you!\u003cbr /\u003e\r\n\t\u003cbr /\u003e\r\n\tIt\u0026#39;s a very simple problem - given a number \u003cb\u003eN\u003c/b\u003e, how many ways can \u003cb\u003eK\u003c/b\u003e numbers less than \u003cb\u003eN\u003c/b\u003e add up to \u003cb\u003eN\u003c/b\u003e?\u003cbr /\u003e\r\n\t\u003cbr /\u003e\r\n\tFor example, for N \u003d 20 and K \u003d 2, there are 21 ways:\u003cbr /\u003e\r\n\t0+20\u003cbr /\u003e\r\n\t1+19\u003cbr /\u003e\r\n\t2+18\u003cbr /\u003e\r\n\t3+17\u003cbr /\u003e\r\n\t4+16\u003cbr /\u003e\r\n\t5+15\u003cbr /\u003e\r\n\t...\u003cbr /\u003e\r\n\t18+2\u003cbr /\u003e\r\n\t19+1\u003cbr /\u003e\r\n\t20+0\u003cbr /\u003e\r\n\t\u003cbr /\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003ch3\u003e\r\n\tInput\u003c/h3\u003e\r\n\u003cp\u003e\r\n\tEach line will contain a pair of numbers N and K. N and K will both be an integer from 1 to 100, inclusive. The input will terminate on 2 0\u0026#39;s.\u003c/p\u003e\r\n\u003ch3\u003e\r\n\tOutput\u003c/h3\u003e\r\n\u003cp\u003e\r\n\tSince Larry is only interested in the last few digits of the answer, for each pair of numbers N and K, print a single number mod 1,000,000 on a single line.\u003c/p\u003e\r\n\u003cbr /\u003e\r\n\u003cbr /\u003e\r\n\u003ch3\u003e\r\n\tSample Input\u003c/h3\u003e\r\n\u003cpre\u003e\r\n20 2\r\n20 2\r\n0 0\r\n\u003c/pre\u003e\r\n\u003ch3\u003e\r\n\tSample Output\u003c/h3\u003e\r\n\u003cpre\u003e\r\n21\r\n21\r\n\u003c/pre\u003e"}}]}