URI Online Judge | 3168

Gnome's Bet

By Matheus Fabian BR Brazil

Timelimit: 1

Basy is a gnome who is working at the North Pole building gifts for Santa to deliver for Christmas. For some unknown reason, each day they learn that each gift built on that day will have an X% chance of coming out defective. The gnomes love to place bets over at the North Pole, so they bet on the number of defective gifts that will be built by the end of the day. Basy will also participate in the bet. As he doesn't know much about mathematics, he wants to know the probabilityof having hit the number of defective gifts

Input

The input has an integer T(1 <= T <= 1000), The number of days that will have bets. Each one of T next lines has an integer N (1 <= N < 50), the number of gifts built that day,an integer K(1 <= K <= N),Basy's chosen number for the bet, and an integer X (0<= X <=100), the percentage chance of each gift being defective that day

Output

The output must consist of the phrase "A chance de Basy acertar o numero no dia 'i' eh 'x'%" where 'i' is the day of the bet and 'x' is the percentage chance of Basy getting the bet right

Input Sample Output Sample

2

10 1 10

6 3 25

A chance de Basy acertar o numero no dia 1 eh 38.74%

A chance de Basy acertar o numero no dia 2 eh 13.18%