407086: GYM102697 057 Minecraft Prank
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
057. Minecraft Pranktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
You are currently playing minecraft with your friends when you get a brilliant idea for a prank, you want to fill his entire house with sand. Given some information that represents the dimensions of your friend's house return the number of blocks of sand needed to fill it up.
InputThe first line will contain a number that is the height of the house. The next line will be the number of lines that will be used to display the foundation of the house. The following lines will be X's that represent the foundation of the house
OutputPrint an integer that is the number of blocks needed to fill the house.
ExampleInput5 7 XXXX XXXX XXXX XXX XXXX XXXX XXXXOutput
21Note
The ceiling, floor, and walls are included within the dimensions of the house so be mindful of that. You can also assume the ceiling is flat.