8729 | 2024-01-26 18:31:30 | NagyLeo | Kiváló számok 2 | pypy3 | Time limit exceeded 71/100 | 1.074s | 87388 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()
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 41ms | 76480 KiB | ||||
subtask2 | 13/13 | ||||||
2 | Accepted | 39ms | 76788 KiB | ||||
3 | Accepted | 39ms | 77112 KiB | ||||
subtask3 | 24/24 | ||||||
4 | Accepted | 54ms | 86536 KiB | ||||
5 | Accepted | 54ms | 86884 KiB | ||||
6 | Accepted | 50ms | 86724 KiB | ||||
7 | Accepted | 54ms | 86768 KiB | ||||
subtask4 | 34/34 | ||||||
8 | Accepted | 61ms | 86876 KiB | ||||
9 | Accepted | 57ms | 86884 KiB | ||||
10 | Accepted | 61ms | 87028 KiB | ||||
11 | Accepted | 61ms | 87388 KiB | ||||
subtask5 | 0/29 | ||||||
12 | Time limit exceeded | 1.07s | 25920 KiB | ||||
13 | Time limit exceeded | 1.031s | 25924 KiB | ||||
14 | Time limit exceeded | 1.067s | 25960 KiB | ||||
15 | Time limit exceeded | 1.039s | 26028 KiB | ||||
16 | Time limit exceeded | 1.052s | 26172 KiB | ||||
17 | Time limit exceeded | 1.052s | 25904 KiB | ||||
18 | Time limit exceeded | 1.074s | 25984 KiB |