結果

問題 No.1336 Union on Blackboard
ユーザー wolgnik
提出日時 2021-01-15 21:34:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 82,496 KB
実行使用メモリ 62,364 KB
最終ジャッジ日時 2024-11-26 13:29:31
合計ジャッジ時間 2,743 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
mod = 10 ** 9 + 7
for _ in range(int(input())):
  N = int(input())
  a = list(map(int, input().split()))
  res = 1
  for x in a:
    res *= x + 1
    res %= mod
  res -= 1
  res %= mod
  print(res)
0