結果

問題 No.1336 Union on Blackboard
ユーザー persimmon-persimmonpersimmon-persimmon
提出日時 2021-02-12 09:40:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 87,208 KB
実行使用メモリ 76,548 KB
最終ジャッジ日時 2023-09-26 09:08:41
合計ジャッジ時間 5,327 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,008 KB
testcase_01 AC 80 ms
76,180 KB
testcase_02 AC 79 ms
76,312 KB
testcase_03 AC 79 ms
76,100 KB
testcase_04 AC 82 ms
76,376 KB
testcase_05 AC 81 ms
76,152 KB
testcase_06 AC 82 ms
76,356 KB
testcase_07 AC 80 ms
76,548 KB
testcase_08 AC 82 ms
76,140 KB
testcase_09 AC 81 ms
76,292 KB
testcase_10 AC 79 ms
76,176 KB
testcase_11 AC 81 ms
76,288 KB
testcase_12 AC 79 ms
76,088 KB
testcase_13 AC 81 ms
76,272 KB
testcase_14 AC 81 ms
76,296 KB
testcase_15 AC 80 ms
76,348 KB
testcase_16 AC 81 ms
76,376 KB
testcase_17 AC 81 ms
76,284 KB
testcase_18 AC 80 ms
76,240 KB
testcase_19 AC 80 ms
76,544 KB
testcase_20 AC 79 ms
76,356 KB
testcase_21 AC 80 ms
76,356 KB
testcase_22 AC 79 ms
76,164 KB
testcase_23 AC 81 ms
76,160 KB
testcase_24 AC 80 ms
76,232 KB
testcase_25 AC 83 ms
76,096 KB
testcase_26 AC 80 ms
76,396 KB
testcase_27 AC 84 ms
76,440 KB
testcase_28 AC 85 ms
76,132 KB
testcase_29 AC 83 ms
76,408 KB
testcase_30 AC 72 ms
71,608 KB
testcase_31 AC 72 ms
71,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t=int(input())
ans=[]
mod=10**9+7
for _ in range(t):
  n=int(input())
  a=list(map(int,input().split()))
  tmp=0
  for x in a:
    tmp=tmp+tmp*x+x
    tmp%=mod
  ans.append(tmp)
print(*ans,sep='\n')
0