[SWEA] 12221. 구구단2

김은서·2021년 9월 16일
0

SWEA

목록 보기
35/47

Python Code

T = int(input())
for tc in range(1, T+1):
    A, B = map(int, input().split())
    if 1 <= A <= 9 and 1 <= B <= 9:
        print('#{} {}'.format(tc, A*B))
    else:
        print('#{} -1'.format(tc))
profile
Gracelog

0개의 댓글