結果

問題 No.1336 Union on Blackboard
ユーザー U SU S
提出日時 2021-01-15 21:55:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 555 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 82,444 KB
実行使用メモリ 66,968 KB
最終ジャッジ日時 2024-11-26 14:25:55
合計ジャッジ時間 3,020 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys
# input = sys.stdin.readline
def mp():return map(int,input().split())
def lmp():return list(map(int,input().split()))
import math
import bisect
from copy import deepcopy as dc
from itertools import accumulate
from collections import Counter, defaultdict, deque
def ceil(U,V):return (U+V-1)//V
def modf1(N,MOD):return (N-1)%MOD+1
mod = int(1e9)+7

t = int(input())
for _ in range(t):
    n = int(input())
    a = lmp()
    for i in range(n):
        a[i] += 1
    ans = 1
    for i in a:
        ans *= i
        ans %= mod
    print(ans-1)


0