{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"Bono, a very famous singer, had always wanted to have a machine to turn the melodies into strings. Last month he earned two million dollars and bought one of those amazing machines, suddenly he began to play some solos to test his new toy. Surprisingly this machine was able to take a piece of song and output a string of lowercase characters from **\u0027a\u0027** to **\u0027z\u0027**.\n\nAfter playing his two best solos he took the resulting strings **A** and **B** and began to count substrings and repetitions. He is a great singer but is not good in programming at all, that\u0027s why he needs you to help him to find how many distinct substrings of **A** that don\u0027t contain **B** as a substring."}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026#8804; 25)**, denoting the number of test cases.\n\nEach case starts with a line containing string **A**. The next line contains string **B**. You can safely assume that the strings are non-empty and none of their lengths is more than **50000** and they will contain lowercase English alphabets only."}},{"title":"Output","value":{"format":"MD","content":"For each case, print the case number and the number of substrings that Bono needs to know."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4\nababa\nba\nababa\na\nabbabaaaba\naa\nababababa\nbab\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 3\nCase 2: 1\nCase 3: 15\nCase 4: 5\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}