226982026-01-15 16:45:54vyrallAI rizikópython3Wrong answer 0/10017ms3180 KiB
import sys

# uncomment the two following lines if you want to read/write from files
# sys.stdin = open('input.txt')
# sys.stdout = open('output.txt', 'w')

T = int(input().strip())
for test in range(1, T+1):
    N, M = map(int, input().strip().split())

    W = ""

    if N == M:
        W = "draw"
    else:
        if N % 3 < 2:
            beat = N // 3 * 2 + 2
        else:
            beat = N // 3 * 2 + 3
        if M >= beat:
            W = "filippo"
        else:
            W = "tommaso"

    print(W)

sys.stdout.close()
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms2868 KiB
subtask20/30
2Wrong answer16ms3120 KiB
3Wrong answer16ms2868 KiB
subtask30/30
4Wrong answer16ms3120 KiB
5Wrong answer16ms2868 KiB
6Wrong answer16ms2868 KiB
7Wrong answer16ms3048 KiB
subtask40/40
8Accepted16ms2868 KiB
9Wrong answer16ms3120 KiB
10Wrong answer16ms2868 KiB
11Wrong answer16ms2868 KiB
12Wrong answer16ms3048 KiB
13Wrong answer16ms2868 KiB
14Wrong answer16ms3180 KiB