116462024-11-02 23:15:24KezdőPingpongpython3Wrong answer 0/10037ms3180 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 = [B%10] + [10]*(B//10)
            BB += [0] * (len(AA)-len(BB))
        for i in range(len(AA)):
            print(AA[i],BB[i])
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms3128 KiB
subtask20/20
2Wrong answer16ms3132 KiB
subtask30/30
3Wrong answer18ms3128 KiB
subtask40/50
4Wrong answer29ms3128 KiB
5Wrong answer32ms3180 KiB
6Wrong answer37ms3128 KiB