{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\nMathJax.Hub.Config({\n tex2jax: {inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]], displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]}\n});\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async\n src\u003d\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\"\u003e\n\u003c/script\u003e\n\nA string is a finite sequence of symbols that are chosen from an alphabet. In this problem you are given two non-empty strings **A** and **B**, both contain lower case English alphabets. You have to find the number of times **B** occurs as a substring of **A**."}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026#8804; 5)**, denoting the number of test cases.\n\nEach case starts with two lines. First line contains **A** and second line contains **B**. You can assume than **1 \u0026#8804; length(A), length(B) \u0026#8804; 10\u003csup\u003e6\u003c/sup\u003e**."}},{"title":"Output","value":{"format":"MD","content":"For each case, print the case number and the number of times **B** occurs as a substring of **A**."}},{"title":"Sample Input","value":{"format":"MD","content":"\u003cpre\u003e4\naxbyczd\nabc\nabcabcabcabc\nabc\naabacbaabbaaz\naab\naaaaaa\naa\n\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"MD","content":"\u003cpre\u003eCase 1: 0\nCase 2: 4\nCase 3: 2\nCase 4: 5\n\u003c/pre\u003e"}}]}