#P2111. 考场奇遇
考场奇遇
Description
After the English exam ended and the bell rang, she took the initiative to talk to Xiao Ming and immediately asked to borrow his English paper to check answers. Xiao Ming is recognized as an English master, so he lent it to her without hesitation. After checking, Xiao Hong found her answers were vastly different; she broke into a cold sweat. At this moment, Xiao Ming came over to comfort her: “It’s okay, I’m not the official answer key; I might not be entirely correct.”
It is known that Xiao Ming’s accuracy rate is , and there are questions in total. You are given Xiao Hong’s comparison result (a 01 string of length , where 1 means their answers are the same and 0 means they are different). To simplify the problem, all questions are True/False questions.
Please help Xiao Hong write a program to compute the probability that she answers at least questions correctly.
(P.S. Xiao Ming later gave that paper to Xiao Hong. Don’t overthink it—it wasn’t a love token.)
Input Format
The first line contains three positive integers , , .
The second line contains a 01 string .
Output Format
One line containing a real number: the probability that she answers at least questions correctly. Print decimal places.
3 90 2
100
0.172
Hint
For of the testdata, , .
For the remaining of the testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号