8730 | 2024-01-26 18:48:40 | NagyLeo | Kiváló számok 2 | pypy3 | Runtime error 71/100 | 76ms | 90464 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()
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 41ms | 75788 KiB | ||||
subtask2 | 13/13 | ||||||
2 | Accepted | 39ms | 76380 KiB | ||||
3 | Accepted | 48ms | 77104 KiB | ||||
subtask3 | 24/24 | ||||||
4 | Accepted | 43ms | 77100 KiB | ||||
5 | Accepted | 39ms | 77380 KiB | ||||
6 | Accepted | 41ms | 77072 KiB | ||||
7 | Accepted | 46ms | 77900 KiB | ||||
subtask4 | 34/34 | ||||||
8 | Accepted | 48ms | 78648 KiB | ||||
9 | Accepted | 45ms | 78816 KiB | ||||
10 | Accepted | 50ms | 78984 KiB | ||||
11 | Accepted | 45ms | 79144 KiB | ||||
subtask5 | 0/29 | ||||||
12 | Runtime error | 67ms | 89552 KiB | ||||
13 | Runtime error | 75ms | 89312 KiB | ||||
14 | Runtime error | 76ms | 89608 KiB | ||||
15 | Runtime error | 68ms | 89856 KiB | ||||
16 | Runtime error | 75ms | 90032 KiB | ||||
17 | Runtime error | 75ms | 90464 KiB | ||||
18 | Runtime error | 75ms | 90332 KiB |