結果

問題 No.1336 Union on Blackboard
ユーザー brthyyjpbrthyyjp
提出日時 2021-01-15 21:37:32
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 190 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 87,116 KB
実行使用メモリ 76,508 KB
最終ジャッジ日時 2023-08-17 16:22:17
合計ジャッジ時間 4,514 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,356 KB
testcase_01 AC 82 ms
76,168 KB
testcase_02 AC 83 ms
76,028 KB
testcase_03 AC 86 ms
76,280 KB
testcase_04 AC 81 ms
76,412 KB
testcase_05 AC 81 ms
76,508 KB
testcase_06 AC 82 ms
76,388 KB
testcase_07 AC 81 ms
76,220 KB
testcase_08 AC 81 ms
76,184 KB
testcase_09 AC 81 ms
76,376 KB
testcase_10 AC 81 ms
76,408 KB
testcase_11 AC 81 ms
76,036 KB
testcase_12 AC 81 ms
76,256 KB
testcase_13 AC 81 ms
76,056 KB
testcase_14 AC 81 ms
76,260 KB
testcase_15 AC 81 ms
76,364 KB
testcase_16 AC 81 ms
76,164 KB
testcase_17 AC 82 ms
76,176 KB
testcase_18 AC 81 ms
76,388 KB
testcase_19 AC 81 ms
76,024 KB
testcase_20 AC 81 ms
76,116 KB
testcase_21 AC 79 ms
76,016 KB
testcase_22 AC 81 ms
76,064 KB
testcase_23 AC 82 ms
76,352 KB
testcase_24 AC 82 ms
76,060 KB
testcase_25 AC 80 ms
76,344 KB
testcase_26 AC 80 ms
76,388 KB
testcase_27 AC 83 ms
76,032 KB
testcase_28 AC 82 ms
76,184 KB
testcase_29 AC 81 ms
76,208 KB
testcase_30 AC 73 ms
71,176 KB
testcase_31 AC 72 ms
71,164 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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