87282024-01-26 18:27:24NagyLeoKiváló számok 2pypy3Time limit exceeded 37/1001.069s87312 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

        print(f"{last % MOD}")

count_excellent_2()
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted48ms76724 KiB
subtask213/13
2Accepted43ms76584 KiB
3Accepted46ms76712 KiB
subtask324/24
4Accepted54ms86300 KiB
5Accepted61ms86924 KiB
6Accepted54ms86832 KiB
7Accepted50ms87312 KiB
subtask40/34
8Time limit exceeded1.046s31868 KiB
9Time limit exceeded1.052s32816 KiB
10Time limit exceeded1.037s31100 KiB
11Time limit exceeded1.069s32900 KiB
subtask50/29
12Time limit exceeded1.054s36880 KiB
13Time limit exceeded1.067s37480 KiB
14Time limit exceeded1.049s37304 KiB
15Time limit exceeded1.059s37508 KiB
16Time limit exceeded1.062s37460 KiB
17Time limit exceeded1.054s37492 KiB
18Time limit exceeded1.062s38220 KiB