Skip to content

Baekjoon 5217

1. Problem

문제 확인하기

2. Solution (memory: 31256KB, time: 44ms)

for _ in range(int(input())):
    num = int(input())
    print(f"Pairs for {num}:", end=' ')
    for i in range(1, num // 2 + 1):
        if i != num - i:
            if i != 1:
                print(',', end=' ')
            print(i, num - i, end='')
    print()