結果

問題 No.1811 EQUIV Ten
ユーザー prussian_coderprussian_coder
提出日時 2022-03-20 17:29:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 284 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 76,288 KB
最終ジャッジ日時 2024-04-16 10:23:21
合計ジャッジ時間 3,886 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
51,968 KB
testcase_01 AC 42 ms
51,840 KB
testcase_02 AC 50 ms
59,392 KB
testcase_03 AC 41 ms
52,224 KB
testcase_04 AC 41 ms
51,840 KB
testcase_05 AC 42 ms
51,968 KB
testcase_06 AC 42 ms
52,096 KB
testcase_07 AC 42 ms
51,840 KB
testcase_08 AC 46 ms
51,840 KB
testcase_09 AC 42 ms
52,096 KB
testcase_10 AC 42 ms
52,224 KB
testcase_11 AC 115 ms
75,904 KB
testcase_12 AC 118 ms
76,032 KB
testcase_13 AC 124 ms
75,904 KB
testcase_14 AC 125 ms
75,992 KB
testcase_15 AC 124 ms
75,776 KB
testcase_16 AC 41 ms
51,840 KB
testcase_17 AC 50 ms
59,904 KB
testcase_18 AC 53 ms
61,440 KB
testcase_19 AC 49 ms
59,520 KB
testcase_20 AC 61 ms
69,632 KB
testcase_21 AC 59 ms
68,992 KB
testcase_22 AC 53 ms
61,312 KB
testcase_23 AC 85 ms
75,904 KB
testcase_24 AC 63 ms
74,240 KB
testcase_25 AC 53 ms
61,440 KB
testcase_26 AC 80 ms
76,032 KB
testcase_27 AC 70 ms
63,872 KB
testcase_28 AC 42 ms
52,352 KB
testcase_29 AC 49 ms
59,520 KB
testcase_30 AC 112 ms
75,776 KB
testcase_31 AC 56 ms
65,536 KB
testcase_32 AC 69 ms
75,904 KB
testcase_33 AC 68 ms
75,904 KB
testcase_34 AC 110 ms
76,032 KB
testcase_35 AC 80 ms
76,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
dp2=[0 for _ in range(16)]
dp2[0]=1
mod=10**9+7
for i in range(N):
	dp=dp2.copy()
	dp2=[0 for _ in range(16)]
	for j in range(16):
		dp2[(j*2)%16]+=dp[j]
		dp2[(j*2+1)%16]+=dp[j]
		dp2[(j*2)%16]%=mod
		dp2[(j*2+1)%16]%=mod
	dp2[10]=0
print((pow(2,N,mod)-sum(dp2))%mod)	
0