#C9945. Attendance Rate Calculation
Attendance Rate Calculation
Attendance Rate Calculation
Given a string of characters 'P' (present) and 'A' (absent) that represents an attendance record for a month, compute the attendance rate as a percentage rounded to the nearest integer.
The attendance rate is defined by the formula:
$$\text{Attendance Rate} = \text{round}\left(\frac{\text{number of }P}{\text{total days}} \times 100\right)$$
Your program should read the input from stdin and output the result to stdout.
inputFormat
A single line containing a non-empty string composed exclusively of the characters 'P' and 'A'. The length of the string is the total number of days.
outputFormat
A single integer representing the attendance rate (in percentage), rounded to the nearest integer.## sample
PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
100