結果

問題 No.1336 Union on Blackboard
ユーザー googol_S0googol_S0
提出日時 2021-01-15 21:51:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 186 bytes
コンパイル時間 435 ms
コンパイル使用メモリ 87,272 KB
実行使用メモリ 75,876 KB
最終ジャッジ日時 2023-08-17 16:47:55
合計ジャッジ時間 4,331 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,016 KB
testcase_01 AC 81 ms
75,836 KB
testcase_02 AC 86 ms
75,580 KB
testcase_03 AC 80 ms
75,784 KB
testcase_04 AC 82 ms
75,756 KB
testcase_05 AC 82 ms
75,480 KB
testcase_06 AC 78 ms
75,716 KB
testcase_07 AC 81 ms
75,788 KB
testcase_08 AC 82 ms
75,776 KB
testcase_09 AC 81 ms
75,776 KB
testcase_10 AC 81 ms
75,696 KB
testcase_11 AC 81 ms
75,724 KB
testcase_12 AC 80 ms
75,576 KB
testcase_13 AC 82 ms
75,664 KB
testcase_14 AC 79 ms
75,812 KB
testcase_15 AC 79 ms
75,772 KB
testcase_16 AC 80 ms
75,564 KB
testcase_17 AC 82 ms
75,820 KB
testcase_18 AC 83 ms
75,496 KB
testcase_19 AC 81 ms
75,484 KB
testcase_20 AC 83 ms
75,804 KB
testcase_21 AC 78 ms
75,572 KB
testcase_22 AC 80 ms
75,856 KB
testcase_23 AC 85 ms
75,716 KB
testcase_24 AC 82 ms
75,740 KB
testcase_25 AC 84 ms
75,876 KB
testcase_26 AC 82 ms
75,704 KB
testcase_27 AC 82 ms
75,516 KB
testcase_28 AC 81 ms
75,720 KB
testcase_29 AC 84 ms
75,812 KB
testcase_30 AC 72 ms
71,340 KB
testcase_31 AC 74 ms
70,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod=10**9+7
def solve():
  N=int(input())
  A=list(map(int,input().split()))
  P=A[0]
  for i in range(1,N):
    P=(P+A[i]+P*A[i])%mod
  print(P)

for i in range(int(input())):
  solve()
0