結果

問題 No.1336 Union on Blackboard
ユーザー ayaoniayaoni
提出日時 2021-01-16 02:09:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 610 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 87,256 KB
実行使用メモリ 76,652 KB
最終ジャッジ日時 2023-08-17 20:18:43
合計ジャッジ時間 4,294 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,200 KB
testcase_01 AC 81 ms
76,432 KB
testcase_02 AC 82 ms
76,520 KB
testcase_03 AC 81 ms
76,356 KB
testcase_04 AC 77 ms
76,600 KB
testcase_05 AC 84 ms
76,444 KB
testcase_06 AC 81 ms
76,388 KB
testcase_07 AC 82 ms
76,444 KB
testcase_08 AC 83 ms
76,444 KB
testcase_09 AC 82 ms
76,612 KB
testcase_10 AC 82 ms
76,408 KB
testcase_11 AC 79 ms
76,652 KB
testcase_12 AC 79 ms
76,560 KB
testcase_13 AC 76 ms
76,524 KB
testcase_14 AC 82 ms
76,520 KB
testcase_15 AC 83 ms
76,260 KB
testcase_16 AC 81 ms
76,404 KB
testcase_17 AC 84 ms
76,404 KB
testcase_18 AC 81 ms
76,440 KB
testcase_19 AC 79 ms
76,464 KB
testcase_20 AC 80 ms
76,400 KB
testcase_21 AC 81 ms
76,548 KB
testcase_22 AC 80 ms
76,500 KB
testcase_23 AC 81 ms
76,488 KB
testcase_24 AC 81 ms
76,444 KB
testcase_25 AC 81 ms
76,416 KB
testcase_26 AC 82 ms
76,516 KB
testcase_27 AC 81 ms
76,428 KB
testcase_28 AC 81 ms
76,532 KB
testcase_29 AC 80 ms
76,404 KB
testcase_30 AC 75 ms
71,564 KB
testcase_31 AC 75 ms
71,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


T = I()
mod = 10**9+7

for _ in range(T):
    N = I()
    A = LI()
    ans = 1
    for a in A:
        ans *= 1+a
        ans %= mod
    print((ans-1) % mod)
0