結果
問題 |
No.1336 Union on Blackboard
|
ユーザー |
|
提出日時 | 2022-12-09 00:50:58 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 54 ms / 2,000 ms |
コード長 | 241 bytes |
コンパイル時間 | 301 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 62,208 KB |
最終ジャッジ日時 | 2024-10-14 18:21:30 |
合計ジャッジ時間 | 2,809 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 31 |
ソースコード
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) % DIV) print(A[0])