87302024-01-26 18:48:40NagyLeoKiváló számok 2pypy3Runtime error 71/10076ms90464 KiB
MOD = 10**9 + 7


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

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

        if N % 2 == 0:
            last = (2 ** N + 2) // 3
        else:
            last = (2 ** N - 2) // 3

        print(f"{last % MOD}")


count_excellent_3()
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted41ms75788 KiB
subtask213/13
2Accepted39ms76380 KiB
3Accepted48ms77104 KiB
subtask324/24
4Accepted43ms77100 KiB
5Accepted39ms77380 KiB
6Accepted41ms77072 KiB
7Accepted46ms77900 KiB
subtask434/34
8Accepted48ms78648 KiB
9Accepted45ms78816 KiB
10Accepted50ms78984 KiB
11Accepted45ms79144 KiB
subtask50/29
12Runtime error67ms89552 KiB
13Runtime error75ms89312 KiB
14Runtime error76ms89608 KiB
15Runtime error68ms89856 KiB
16Runtime error75ms90032 KiB
17Runtime error75ms90464 KiB
18Runtime error75ms90332 KiB