The great crocheting festival held every year is approaching. Mr. Wincenty, who is skilled at crocheting, decided to help out his neighbors by crocheting a banner that advertises the festival. Unfortunately, he made a large mistake in the text he crocheted onto it.
His son Witek wants to help his father fix the banner. To repair it he may use only the following two operations.
Each operation takes X+S⋅Y minutes, where S is the length of the run of letters inserted or deleted in that operation. Find the minimum total time needed to turn the initial banner text into the target banner text.
The first line contains the number of test cases L. The descriptions of the test cases follow.
Each test case consists of three lines.
Both S1 and S2 consist only of uppercase English letters.
For each test case, print the minimum repair time on its own line, with 6 digits after the decimal point.