Personal Contest 2010.07.26 (public)

From: 2010-07-26 12:00:00 To: 2010-07-26 15:00:00 Now: 2017-09-22 06:52:45 Status: Public

C - Character Recognition

Time Limit: 1s Memory Limit: 128MB

Submissions: 639 Solved: 113
Description

The university bought a new program for Optical Character Recognition (OCR). The program is used for transforming paper documentation to an electronic form. Obviously, the transformation process is not 100% reliable and some characters are not recognized. Your task is to write a program that determines the recognition process efficiency ratio. The ratio should be computed as R/A where R is the number of recognized characters and A is the number of all characters. End-of-line characters (newlines) do not count as characters.

Input

The input consists of N test cases. The number of them (N) is given on the first line of the input file. Each test case contains at least one line of processed text where unrecognized characters are represented by "#". There is one empty line after each test case, including the last one. No other lines may be empty. No line will be longer than 100 characters.

Output

Print exactly one line for each test case. The line should contain the sentence "Efficiency ratio is X%."whereX is the ratio in percent, rounded to the nearest number with exactly one digit after the decimal point (0.05 rounds up to 0.1).

Sample Input
3
Pr#nt ex##tly one##ine for#eac# te#t c#se.

None.

The i#put consists of
N test ca#es. The number
of th#m (N) is given on
the first #ine
of the#input#file.
Sample Output
Efficiency ratio is 78.6%.
Efficiency ratio is 100%.
Efficiency ratio is 94%.
Hint
Source
Central Europe Regional Contest 2007 - Practice Session