Submit solution
Points:
15 (partial)
Time limit:
1.4s
Rust
2.5s
Memory limit:
64M
Authors:
Problem type
After returning from the nautical lessons, Captain Akeno asked her good friend
to go and get her some more shoes while she is at school, from the same shop. When arrived at the store, he observed some deals. The deals are as follows:- If you group two pairs of shoes, you get the cheaper one at a 50% discount.
- If you group three pairs of shoes, you get the cheapest one for free.
Input Specification
The first line of input will contain two space-separated integers,
The second line of input will contain
Output Specification
On the first line, you must print the -1
.
Sample Input
Copy
5 3
100 27 15 25 400
Sample Output
Copy
541.0
Comments
I be Spendin' dat
dollas on mah shoes homie. Idk about u but I roll big