#bzoj3560. DZY Loves Math V

DZY Loves Math V

題目描述

給定nn個正整數a1,a2,,ana_1,a_2,…,a_n,求 image1的值(答案 modmod 109+710^9+7)。

輸入格式

第一行一個正整數nn

接下來nn行,每行一個正整數,分別為a1,a2,,ana_1,a_2,…,a_n

輸出格式

僅一行答案。

樣例

3
6
10
15
1595

數據範圍與約定

1n105,1ai1071\le n\le 10^5,1\le a_i\le 10^7, 共3組數據。