結果

問題 No.1336 Union on Blackboard
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-01-15 21:41:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 185 bytes
コンパイル時間 440 ms
コンパイル使用メモリ 87,244 KB
実行使用メモリ 76,632 KB
最終ジャッジ日時 2023-08-17 16:29:05
合計ジャッジ時間 4,021 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,636 KB
testcase_01 AC 81 ms
76,336 KB
testcase_02 AC 80 ms
76,336 KB
testcase_03 AC 80 ms
76,384 KB
testcase_04 AC 77 ms
76,336 KB
testcase_05 AC 78 ms
76,252 KB
testcase_06 AC 75 ms
76,520 KB
testcase_07 AC 74 ms
76,284 KB
testcase_08 AC 74 ms
76,216 KB
testcase_09 AC 74 ms
76,340 KB
testcase_10 AC 75 ms
76,544 KB
testcase_11 AC 75 ms
76,432 KB
testcase_12 AC 78 ms
76,288 KB
testcase_13 AC 79 ms
76,372 KB
testcase_14 AC 77 ms
76,280 KB
testcase_15 AC 79 ms
76,152 KB
testcase_16 AC 77 ms
76,632 KB
testcase_17 AC 75 ms
76,140 KB
testcase_18 AC 77 ms
76,272 KB
testcase_19 AC 77 ms
76,308 KB
testcase_20 AC 76 ms
76,388 KB
testcase_21 AC 75 ms
76,352 KB
testcase_22 AC 77 ms
76,356 KB
testcase_23 AC 75 ms
76,356 KB
testcase_24 AC 77 ms
76,276 KB
testcase_25 AC 77 ms
76,368 KB
testcase_26 AC 77 ms
76,536 KB
testcase_27 AC 80 ms
76,300 KB
testcase_28 AC 75 ms
76,388 KB
testcase_29 AC 76 ms
76,148 KB
testcase_30 AC 65 ms
71,448 KB
testcase_31 AC 65 ms
71,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
mod = 10**9+7
for i in range(t):
    n = int(input())
    a = list(map(int,input().split()))
    ans = 0
    for i in a:
        ans = (ans*i+ans+i)%mod
    print(ans)
0