87272024-01-26 18:26:25NagyLeoKiváló számok 2pypy3Wrong answer 0/1001.08s86796 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+1):
            if i % 2 == 1:
                last = last*2+2
            else:
                last = last*2-2

        print(f"{last % MOD}")

count_excellent_2()
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer48ms76364 KiB
subtask20/13
2Wrong answer43ms76696 KiB
3Wrong answer46ms76816 KiB
subtask30/24
4Wrong answer54ms86304 KiB
5Wrong answer57ms86712 KiB
6Wrong answer50ms86288 KiB
7Wrong answer61ms86796 KiB
subtask40/34
8Time limit exceeded1.08s31800 KiB
9Time limit exceeded1.027s32544 KiB
10Time limit exceeded1.059s30924 KiB
11Time limit exceeded1.044s32116 KiB
subtask50/29
12Time limit exceeded1.057s36736 KiB
13Time limit exceeded1.042s36972 KiB
14Time limit exceeded1.052s36868 KiB
15Time limit exceeded1.034s36928 KiB
16Time limit exceeded1.057s37288 KiB
17Time limit exceeded1.06s37544 KiB
18Time limit exceeded1.057s37756 KiB