117422024-11-08 15:31:37XetoxinoPingpongpython3Hibás válasz 20/10041ms3320 KiB
N = int(input())
P = [11,11,11]
O = []
for i in range (N):
    A, B = [int(i) for i in input().split()]
    if A > 43:
        P[-1] = 10
        P += [A%43,11]
        T = B - 22
        for i in range(2):
            if T > 9:
               O.append(10)
               T = T - 10
            elif B == 0:
                O.append(0)
            else:
                O.append(T)
                T = 0
        for i in range(2):
            O.append(11)
        if T > 9:
            O.append(10)
            T = T - 10
        elif B == 0:
            O.append(0)
        else:
            O.append(T)
            T = 0
    elif 44 > A > 33:
        P[-1] = A%33
        P.append(11)
        T = B - 11
        for i in range(2):
            if T > 9:
               O.append(10)
               T = T - 10
            elif B == 0:
                O.append(0)
            else:
                O.append(T)
                T = 0
        O.append(11)
        if T > 9:
            O.append(10)
            T = T - 10
        elif B == 0:
            O.append(0)
        else:
            O.append(T)
            T = 0
    else:
        T = B
        for i in range(3):
            if T > 9:
               O.append(10)
               T = T - 10
            elif B == 0:
                O.append(0)
            else:
                O.append(T)
                T = 0
    if 33 > A or A > 53:
        P = [-1]
        O = [-1]
    for i in range(len(P)):
        print(P[i], O[i])
    O = []
    P = [11,11,11]
    
RészfeladatÖsszpontTesztVerdiktIdőMemória
subtask10/0
1Elfogadva17ms3128 KiB
subtask220/20
2Elfogadva16ms3128 KiB
subtask30/30
3Hibás válasz18ms3128 KiB
subtask40/50
4Hibás válasz34ms3132 KiB
5Hibás válasz39ms3128 KiB
6Hibás válasz41ms3320 KiB