結果

問題 No.1336 Union on Blackboard
ユーザー tktk_snsn
提出日時 2021-01-15 23:28:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 263 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 60,160 KB
最終ジャッジ日時 2024-11-26 18:31:53
合計ジャッジ時間 2,573 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)

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