87292024-01-26 18:31:30NagyLeoKiváló számok 2pypy3Time limit exceeded 71/1001.074s87388 KiB
MOD = 10**9 + 7

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

    for __ in range(_):
        N = int(input().strip())
        last = 0
        for i in range(1, N):
            if i % 2 == 1:
                last = last*2+2
            else:
                last = last*2-2
            last %= MOD

        print(f"{last % MOD}")

count_excellent_2()
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted41ms76480 KiB
subtask213/13
2Accepted39ms76788 KiB
3Accepted39ms77112 KiB
subtask324/24
4Accepted54ms86536 KiB
5Accepted54ms86884 KiB
6Accepted50ms86724 KiB
7Accepted54ms86768 KiB
subtask434/34
8Accepted61ms86876 KiB
9Accepted57ms86884 KiB
10Accepted61ms87028 KiB
11Accepted61ms87388 KiB
subtask50/29
12Time limit exceeded1.07s25920 KiB
13Time limit exceeded1.031s25924 KiB
14Time limit exceeded1.067s25960 KiB
15Time limit exceeded1.039s26028 KiB
16Time limit exceeded1.052s26172 KiB
17Time limit exceeded1.052s25904 KiB
18Time limit exceeded1.074s25984 KiB