結果
問題 |
No.1336 Union on Blackboard
|
ユーザー |
![]() |
提出日時 | 2021-01-15 21:57:15 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 36 ms / 2,000 ms |
コード長 | 272 bytes |
コンパイル時間 | 399 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-26 14:29:09 |
合計ジャッジ時間 | 2,154 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 31 |
ソースコード
import sys input = sys.stdin.buffer.readline mod = 10**9+7 T = int(input()) for _ in range(T): N = int(input()) A = list(map(int, input().rstrip().split())) ans = 1 for a in A: ans *= (a+1) ans %= mod ans = (ans-1)%mod print(ans)