Copy-and-Submit-II
题目链接 https://nanti.jisuanke.com/t/26220
Description:
1 | |
Input:
Input consists of several test cases. Each test case begins with an integer n. Then it’s followed by n integers a[i].
0<n<=1000000
0<=a[i]<=10000
There are 100 test cases at most. The size of input file is less than 48MB.
Output:
Maybe you can just copy and submit. Maybe not.
样例输入
1 | |
样例输出
1 | |
题解
要求写一个与给定的程序功能一样的程序
观察这个递归,然后发现它是求(1+a1)(1+a2)(1+a3)..(1+an) ,递推的求就可以了
注意内存大小,不能开数组
1 | |
Copy-and-Submit-II
http://xorsum.github.op/2018/04/22/ACM/Copy-and-Submit-II/