CF204C Little Elephant and Furik and Rubik
Description
Little Elephant loves Furik and Rubik, who he met in a small city Kremenchug.
The Little Elephant has two strings of equal length $ a $ and $ b $ , consisting only of uppercase English letters. The Little Elephant selects a pair of substrings of equal length — the first one from string $ a $ , the second one from string $ b $ . The choice is equiprobable among all possible pairs. Let's denote the substring of $ a $ as $ x $ , and the substring of $ b $ — as $ y $ . The Little Elephant gives string $ x $ to Furik and string $ y $ — to Rubik.
Let's assume that $ f(x,y) $ is the number of such positions of $ i $ ( $ 1
Input Format
The first line contains a single integer $ n $ ( $ 1
Output Format
On a single line print a real number — the answer to the problem. The answer will be considered correct if its relative or absolute error does not exceed $ 10^{-6} $ .
Explanation/Hint
Let's assume that we are given string $ a=a_{1}a_{2}...\ a_{|a|} $ , then let's denote the string's length as $ |a| $ , and its $ i $ -th character — as $ a_{i} $ .
A substring $ a[l...\ r] $ $ (1