Məsələlər
Series of Powers
Series of Powers
In this problem you must find the sum of powers:
\textbf{S}(\textbf{l}, \textbf{h}, \textbf{k}) = \textbf{l^k }+ (\textbf{l} + \textbf{1})^k+ (\textbf{l} + \textbf{2})^k+ ... + (\textbf{h} - \textbf{1})^k+ \textbf{h^k}
Given the values of \textbf{l}, \textbf{h} and \textbf{k} your job is to find the value of \textbf{S}(\textbf{l}, \textbf{h}, \textbf{k}).
\InputFile
Consists of no more than \textbf{9999} test cases. Each line contains three integers \textbf{l}, \textbf{h} (\textbf{0} ≤\textbf{ l} ≤ \textbf{h} ≤ \textbf{15000000}, |\textbf{l} - \textbf{h}|≤ \textbf{1000}) and \textbf{k} (\textbf{1} ≤ \textbf{k} ≤ \textbf{15000000}). Input is terminated by a line with three -\textbf{1}.
\OutputFile
For each test case print in a separate line its serial number in four fields and the approximate value of \textbf{S}(\textbf{l}, \textbf{h}, \textbf{k}). This approximate value should be of the form \textbf{0.ddddddedddddddddd}. The value of mantissa is always less than \textbf{1} and has six digits after the decimal point. If mantissa is not zero, the first digit after the decimal point must not be zero. If value of the exponent is irrelevant (does not effect the value of the number) set its value as \textbf{1}. Follow the exact formatting shown in the sample output.
Giriş verilənləri #1
1 10 10 10 15 100 -1 -1 -1
Çıxış verilənləri #1
Case 0001: 0.149143e0000000011 Case 0002: 0.406971e0000000118