728x90
반응형

단순 구현 문제이다.

N, M = map(int, input().split())
for i in range(1, N*M+1):
    if i%M == 0:
        print(i)
    else:
        print(i, end=' ')
728x90
반응형

+ Recent posts