116472024-11-03 14:13:29KezdőPingpongpython3Wrong answer 20/10035ms3168 KiB
N = int(input())
for i in range(N):
    A,B = [int(i) for i in input().split()]
    if A <= B or A < 33:
        print(-1,-1)
    else:
        if A%11 != 0:
            AA = [A%11,11,11,11]
            #A -= A%11
            BB = [11]
            B -= 11
            if B > 10:
                BB.append(10)
                B -= 10
                if B > 10:
                    BB.append(10)
                    B -= 10
                    BB.append(B)
                else:
                    BB += [B,0]
            else:
                BB += [B,0,0]
        else:
            AA = [11,11,11]
            BB = [10]*(B//10) + [B%10]
            BB += [0] * (len(AA)-len(BB))
        for i in range(len(AA)):
            print(AA[i],BB[i])
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted14ms3128 KiB
subtask220/20
2Accepted14ms3128 KiB
subtask30/30
3Wrong answer17ms3080 KiB
subtask40/50
4Wrong answer30ms3128 KiB
5Wrong answer32ms3168 KiB
6Wrong answer35ms3128 KiB