結果

問題 No.1336 Union on Blackboard
ユーザー 👑 H20H20
提出日時 2021-01-15 22:09:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 48 ms / 2,000 ms
コード長 196 bytes
コンパイル時間 674 ms
コンパイル使用メモリ 82,380 KB
実行使用メモリ 62,672 KB
最終ジャッジ日時 2024-05-05 00:01:54
合計ジャッジ時間 2,595 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,168 KB
testcase_01 AC 42 ms
60,648 KB
testcase_02 AC 41 ms
61,080 KB
testcase_03 AC 42 ms
60,124 KB
testcase_04 AC 41 ms
62,132 KB
testcase_05 AC 42 ms
60,964 KB
testcase_06 AC 42 ms
62,020 KB
testcase_07 AC 43 ms
60,988 KB
testcase_08 AC 42 ms
60,736 KB
testcase_09 AC 43 ms
62,288 KB
testcase_10 AC 41 ms
61,712 KB
testcase_11 AC 42 ms
61,608 KB
testcase_12 AC 47 ms
61,016 KB
testcase_13 AC 42 ms
61,880 KB
testcase_14 AC 43 ms
61,024 KB
testcase_15 AC 46 ms
61,064 KB
testcase_16 AC 47 ms
62,228 KB
testcase_17 AC 46 ms
61,684 KB
testcase_18 AC 47 ms
61,204 KB
testcase_19 AC 46 ms
61,740 KB
testcase_20 AC 47 ms
61,072 KB
testcase_21 AC 47 ms
61,176 KB
testcase_22 AC 48 ms
61,184 KB
testcase_23 AC 47 ms
62,448 KB
testcase_24 AC 47 ms
62,672 KB
testcase_25 AC 48 ms
61,260 KB
testcase_26 AC 47 ms
61,056 KB
testcase_27 AC 45 ms
61,956 KB
testcase_28 AC 45 ms
60,880 KB
testcase_29 AC 44 ms
62,172 KB
testcase_30 AC 34 ms
52,268 KB
testcase_31 AC 33 ms
52,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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