結果

問題 No.1336 Union on Blackboard
ユーザー tobusakanatobusakana
提出日時 2022-12-09 00:50:20
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 233 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 82,288 KB
実行使用メモリ 66,944 KB
最終ジャッジ日時 2024-10-14 18:21:19
合計ジャッジ時間 2,779 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other WA * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
DIV = 10 ** 9 + 7
for _ in range(T):
    N = int(input())
    A = list(map(int,input().split()))
    while len(A) >= 2:
        x = A.pop()
        y = A.pop()
        A.append((x + 1) * (y + 1) - 1)
    print(A[0])
0