結果

問題 No.1336 Union on Blackboard
ユーザー rlangevin
提出日時 2023-01-02 16:30:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 180 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 60,928 KB
最終ジャッジ日時 2024-11-27 01:00:01
合計ジャッジ時間 2,817 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

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