結果

問題 No.1336 Union on Blackboard
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-01-15 22:07:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 219 bytes
コンパイル時間 408 ms
コンパイル使用メモリ 87,132 KB
実行使用メモリ 76,512 KB
最終ジャッジ日時 2023-08-17 17:16:56
合計ジャッジ時間 4,403 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,300 KB
testcase_01 AC 83 ms
76,512 KB
testcase_02 AC 82 ms
76,412 KB
testcase_03 AC 81 ms
76,248 KB
testcase_04 AC 84 ms
76,472 KB
testcase_05 AC 82 ms
76,124 KB
testcase_06 AC 84 ms
76,072 KB
testcase_07 AC 83 ms
76,072 KB
testcase_08 AC 85 ms
76,244 KB
testcase_09 AC 83 ms
76,152 KB
testcase_10 AC 83 ms
76,344 KB
testcase_11 AC 82 ms
76,468 KB
testcase_12 AC 81 ms
76,440 KB
testcase_13 AC 82 ms
76,468 KB
testcase_14 AC 82 ms
76,492 KB
testcase_15 AC 83 ms
76,116 KB
testcase_16 AC 83 ms
76,120 KB
testcase_17 AC 82 ms
76,152 KB
testcase_18 AC 84 ms
76,132 KB
testcase_19 AC 83 ms
76,460 KB
testcase_20 AC 82 ms
76,444 KB
testcase_21 AC 82 ms
76,216 KB
testcase_22 AC 85 ms
76,120 KB
testcase_23 AC 83 ms
76,488 KB
testcase_24 AC 82 ms
76,104 KB
testcase_25 AC 84 ms
76,440 KB
testcase_26 AC 82 ms
76,124 KB
testcase_27 AC 83 ms
76,420 KB
testcase_28 AC 84 ms
76,488 KB
testcase_29 AC 81 ms
76,416 KB
testcase_30 AC 75 ms
71,268 KB
testcase_31 AC 75 ms
70,936 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
for _ in range(t):
    n = int(input())
    a = list(map(int, input().split()))
    cur = a[0]
    for i in range(1, n):
        cur = cur + a[i] + cur * a[i]
        cur %= (10 ** 9 + 7)
    print(cur)
0