#K7316. Multiples Generator
Multiples Generator
Multiples Generator
Given two integers (n) and (m), your task is to generate the first (n) multiples of (m). In other words, if (n > 0), you should output the sequence (m, 2m, 3m, \ldots, nm) separated by spaces. If (n \le 0), the output should be empty. This problem tests basic arithmetic operations and loop constructs.
inputFormat
The input consists of two integers (n) and (m) separated by whitespace. Here, (n) specifies the number of multiples to generate, and (m) is the multiplier.
outputFormat
If (n > 0), output the first (n) multiples of (m) separated by a single space. If (n \le 0), output nothing.## sample
5 3
3 6 9 12 15