Pool table (1)

Write a program that reads the dimensions of a pool table, and that prints with zeros the trajectory of a ball after hitting it in the upper left corner with an angle of 45 degrees.

Input

Input consists of several cases, each with the number of rows and the number of columns. Both numbers are, at least, 2.

Output

Print every pool table as shown in the examples, and an empty line after each table.

Observation

The expected solution do not use vectors or alike, which makes this exercise comparatively difficult.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T12:00:02.408Z

© Jutge.org, 2006–2026.
https://jutge.org