87312024-01-26 18:55:48NagyLeoKiváló számok 2pypy3Wrong answer 13/10050ms79368 KiB
MOD = 10**9 + 7

def count_excellent_3():
    _ = int(input().strip())

    for __ in range(_):
        N = int(input().strip())

        if N % 2 == 0:
            last = (pow(2, N, MOD) + 2) // 3
        else:
            last = (pow(2, N, MOD) - 2) // 3

        print(f"{last % MOD}")


count_excellent_3()
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer43ms76316 KiB
subtask213/13
2Accepted39ms76512 KiB
3Accepted39ms76600 KiB
subtask30/24
4Wrong answer39ms76892 KiB
5Wrong answer46ms77964 KiB
6Wrong answer43ms77176 KiB
7Wrong answer39ms77784 KiB
subtask40/34
8Wrong answer39ms77720 KiB
9Wrong answer46ms77896 KiB
10Wrong answer43ms78764 KiB
11Wrong answer46ms79232 KiB
subtask50/29
12Wrong answer43ms78704 KiB
13Wrong answer39ms78732 KiB
14Wrong answer46ms79316 KiB
15Wrong answer43ms79328 KiB
16Wrong answer50ms79368 KiB
17Wrong answer43ms79168 KiB
18Wrong answer39ms79208 KiB