結果

問題 No.2344 (l+r)^2
ユーザー miho-4miho-4
提出日時 2023-06-09 21:40:02
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 265 bytes
コンパイル時間 1,743 ms
コンパイル使用メモリ 86,756 KB
実行使用メモリ 156,148 KB
最終ジャッジ日時 2023-08-30 13:02:30
合計ジャッジ時間 14,092 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,296 KB
testcase_01 AC 712 ms
79,232 KB
testcase_02 AC 1,998 ms
150,428 KB
testcase_03 AC 1,549 ms
113,088 KB
testcase_04 AC 1,982 ms
145,376 KB
testcase_05 TLE -
testcase_06 TLE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())

def f(i,j):
  if (i,j) not in d:
    d[(i,j)]=(f(i-1,j)+f(i-1,j+1))**2 % 2**m
  return d[(i,j)]

for _ in range(T):
  n,m=map(int,input().split())
  L=list(map(int,input().split()))
  d=dict()
  for j in range(n):
    d[(0,j)]=L[j]
  print(f(n-1,0))
0