117092024-11-06 23:38:52KezdőPingpongpython3Wrong answer 20/10018ms3144 KiB
N = int(input())
for i in range(N):
    A,B = [int(i) for i in input().split()]
    if A == 33 and B <= 30:
        AA = [11,11,11]
        if B == 30:
            BB = [10,10,10]
        else:
            BB = [10]*(B//10) + [B%10]
            BB += [0]*(3-len(BB))
    elif 33 < A <= 44 and B <= 41:
        AA = [A%11,11,11,11]
        if B == 41:
            BB = [11,10,10,10]
        else:
            BB = [11] + [10]*((B-11)//10) + [(B-11)%10]
            BB += [0]*(4-len(BB))
    elif 44 < A <= 53 and B <= 52:
        if A == 53:
            AA = [10,10,11,11,11]
        else:
            AA = [(A-33)%10] + [10]*(B-33)//10 + [11,11,11]
        if B == 52:
            BB = [11,11,10,10,10]
        else:
            BB = [11,11] + [10]*((B-22)//10) + [(B-22)%10]
            BB += [0]*(5-len(BB))
    else:
        AA = [-1]
        BB = [-1]
##    print(AA)
##    print(BB)
    for i in range(len(AA)):
        print(AA[i],BB[i])
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms3128 KiB
subtask220/20
2Accepted17ms3128 KiB
subtask30/30
3Wrong answer18ms3132 KiB
subtask40/50
4Runtime error17ms3112 KiB
5Runtime error16ms3144 KiB
6Runtime error17ms3124 KiB