7332022-01-01 10:51:41kismartongToronyépítés (2,2,3,3)python3Runtime error 20/4075ms45748 KiB
from sys import stdin, stdout

def main():
	n = int(stdin.readline())
	dp = [0, 0, 2, 2]
	for i in range(4, n+1):
		dp.append(2*dp[i-2]+2*dp[i-3])
	stdout.writelines(str(dp[n]%20210108))
	stdout.writelines("\n")

main()
SubtaskSumTestVerdictTimeMemory
base20/40
1Accepted0/054ms18924 KiB
2Accepted0/043ms19412 KiB
3Accepted2/228ms19080 KiB
4Accepted2/228ms19164 KiB
5Accepted3/328ms19176 KiB
6Accepted3/327ms19180 KiB
7Runtime error0/371ms45620 KiB
8Runtime error0/371ms45664 KiB
9Accepted3/326ms19148 KiB
10Accepted3/326ms19208 KiB
11Runtime error0/357ms45688 KiB
12Runtime error0/361ms45692 KiB
13Runtime error0/459ms45748 KiB
14Runtime error0/475ms45712 KiB
15Accepted2/228ms19292 KiB
16Accepted2/228ms19220 KiB