8724 | 2024-01-26 18:00:45 | NagyLeo | Kiváló számok 2 | pypy3 | Time limit exceeded 37/100 | 1.067s | 89692 KiB |
from math import comb
MOD = 10**9 + 7
def count_excellent():
_ = int(input().strip())
for __ in range(_):
N = int(input().strip())
valasz = 0
for i in range(N+1):
if ((N-i)*5 + i) % 3 == 0:
valasz += comb(N, i)
print(valasz % MOD)
count_excellent()
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 71ms | 85824 KiB | ||||
subtask2 | 13/13 | ||||||
2 | Accepted | 41ms | 77452 KiB | ||||
3 | Accepted | 41ms | 77380 KiB | ||||
subtask3 | 24/24 | ||||||
4 | Accepted | 321ms | 89516 KiB | ||||
5 | Accepted | 528ms | 89692 KiB | ||||
6 | Accepted | 300ms | 89044 KiB | ||||
7 | Accepted | 374ms | 89524 KiB | ||||
subtask4 | 0/34 | ||||||
8 | Time limit exceeded | 1.049s | 31068 KiB | ||||
9 | Time limit exceeded | 1.054s | 31328 KiB | ||||
10 | Time limit exceeded | 1.047s | 31964 KiB | ||||
11 | Time limit exceeded | 1.054s | 31856 KiB | ||||
subtask5 | 0/29 | ||||||
12 | Time limit exceeded | 1.034s | 36076 KiB | ||||
13 | Time limit exceeded | 1.059s | 36316 KiB | ||||
14 | Time limit exceeded | 1.05s | 36280 KiB | ||||
15 | Time limit exceeded | 1.046s | 36372 KiB | ||||
16 | Time limit exceeded | 1.062s | 36716 KiB | ||||
17 | Time limit exceeded | 1.067s | 36964 KiB | ||||
18 | Time limit exceeded | 1.062s | 37100 KiB |