{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv id\u003d\"yass_top_edge_dummy\" style\u003d\"width: 1px; height: 1px; padding: 0px; margin: -9px 0px 0px; border-width: 0px; display: block;\"\u003e\r\n\t\u0026nbsp;\u003c/div\u003e\r\n\u003cdiv id\u003d\"yass_top_edge\" style\u003d\"background-image: url(\u0026quot;chrome://yass/content/edgebgtop.png\u0026quot;); background-attachment: scroll; background-position: center bottom; padding: 0px; margin: 0px 0px 8px -8px; border-width: 0px; height: 0px; display: block; width: 1px;\"\u003e\r\n\t\u0026nbsp;\u003c/div\u003e\r\n\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\tYou are given a quadratic function, \u003c!-- MATH\r\n $f(n) \u003d a \\times 2 + b \\times + c$\r\n --\u003e\u003cspan class\u003d\"MATH\"\u003e\u003ci\u003ef\u003c/i\u003e (\u003ci\u003en\u003c/i\u003e) \u003d \u003ci\u003ea\u003c/i\u003e \u003ctt\u003ex\u003c/tt\u003e 2 + \u003ci\u003eb\u003c/i\u003e \u003ctt\u003ex\u003c/tt\u003e + \u003ci\u003ec\u003c/i\u003e\u003c/span\u003e. You are also given a divisor \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003ed\u003c/i\u003e\u003c/span\u003e and a limit \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003eL\u003c/i\u003e\u003c/span\u003e. How many of the function values \u003c!-- MATH\r\n $f(0), f(1),\\dots, f(L)$\r\n --\u003e\u003cspan class\u003d\"MATH\"\u003e\u003ci\u003ef\u003c/i\u003e (0), \u003ci\u003ef\u003c/i\u003e (1),..., \u003ci\u003ef\u003c/i\u003e (\u003ci\u003eL\u003c/i\u003e)\u003c/span\u003e are divisible by \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003ed\u003c/i\u003e\u003c/span\u003e?\u003c/p\u003e\r\n\u003cp\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003cdiv align\u003d\"CENTER\"\u003e\r\n\u003c!-- MATH\r\n $\\epsfbox{p11934.eps}$\r\n --\u003e\t\u003cimg align\u003d\"BOTTOM\" alt\u003d\"\\epsfbox{p11934.eps}\" border\u003d\"0\" height\u003d\"511\" src\u003d\"http://uva.onlinejudge.org/external/119/p11934.png\" width\u003d\"672\" /\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tInput consists of a number of test cases. Each test case consists of a single line containing the numbers \u003c!-- MATH\r\n $a \\ b \\ c \\ d \\ L$\r\n --\u003e\u003cspan class\u003d\"MATH\"\u003e\u003ci\u003ea\u003c/i\u003e\u0026nbsp;\u003ci\u003eb\u003c/i\u003e\u0026nbsp;\u003ci\u003ec\u003c/i\u003e\u0026nbsp;\u003ci\u003ed\u003c/i\u003e\u0026nbsp;\u003ci\u003eL\u003c/i\u003e\u003c/span\u003e (\u003c!-- MATH\r\n $-1000 \\le a,b,c \\le 1000$\r\n --\u003e\u003cspan class\u003d\"MATH\"\u003e\u003cspan data-scayt_word\u003d\"-1000a\" data-scaytid\u003d\"1\"\u003e-1000\u003cimg align\u003d\"MIDDLE\" alt\u003d\"$ \\le$\" border\u003d\"0\" height\u003d\"31\" src\u003d\"http://uva.onlinejudge.org/external/119/11934img2.png\" width\u003d\"18\" /\u003e\u003ci\u003ea\u003c/i\u003e\u003c/span\u003e, \u003ci\u003eb\u003c/i\u003e, \u003cspan data-scayt_word\u003d\"c1000\" data-scaytid\u003d\"2\"\u003e\u003ci\u003ec\u003c/i\u003e\u003cimg align\u003d\"MIDDLE\" alt\u003d\"$ \\le$\" border\u003d\"0\" height\u003d\"31\" src\u003d\"http://uva.onlinejudge.org/external/119/11934img2.png\" width\u003d\"18\" /\u003e1000\u003c/span\u003e\u003c/span\u003e, \u003c!-- MATH\r\n $1 \u003c d \u003c 1000000$\r\n --\u003e\u003cspan class\u003d\"MATH\"\u003e1 \u0026lt; \u003ci\u003ed\u003c/i\u003e \u0026lt; 1000000\u003c/span\u003e, \u003c!-- MATH\r\n $0 \\le L \u003c 1000$\r\n --\u003e\u003cspan class\u003d\"MATH\"\u003e\u003cspan data-scayt_word\u003d\"0L\" data-scaytid\u003d\"3\"\u003e0\u003cimg align\u003d\"MIDDLE\" alt\u003d\"$ \\le$\" border\u003d\"0\" height\u003d\"31\" src\u003d\"http://uva.onlinejudge.org/external/119/11934img2.png\" width\u003d\"18\" /\u003e\u003ci\u003eL\u003c/i\u003e\u003c/span\u003e \u0026lt; 1000\u003c/span\u003e).\u003c/p\u003e\r\n\u003cp\u003e\r\n\tInput is terminated by a line containing `\u003ctt\u003e0 0 0 0 0\u003c/tt\u003e\u0026#39; which should not be processed.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tPrint the answer for each test case (the number of function values \u003c!-- MATH\r\n $f(0), f(1), \\dots, f(L)$\r\n --\u003e\u003cspan class\u003d\"MATH\"\u003e\u003ci\u003ef\u003c/i\u003e (0), \u003ci\u003ef\u003c/i\u003e (1),..., \u003ci\u003ef\u003c/i\u003e (\u003ci\u003eL\u003c/i\u003e)\u003c/span\u003e divisible by \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003ed\u003c/i\u003e\u003c/span\u003e) on a separate line.\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e\r\n0 0 10 5 100\r\n0 0 10 6 100\r\n1 2 3 4 5\r\n1 2 3 3 5\r\n0 0 0 0 0\r\n\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e\r\n101\r\n0\r\n0\r\n4\r\n\u003c/pre\u003e"}}]}