Number of composters
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Write a program that, following the conditions outlined in the previous problem, calculates the number of distinct composters that can be created on a grid with dimensions M×N nodes.
Input
The program should read input data for multiple tests from a single ASCII text file. Each line in the file represents a test case and contains two numbers, M and N, separated by a space.
Both M and N are no greater than 15.
Output
The program should output the results for all tests into a single ASCII text file. Each result should be on a separate line, displaying the test's serial number followed by the number of composters.
Examples
Input #1
Answer #1