TrickGCD

TimeLimit:2500MS  MemoryLimit:262144KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description
You are given an array $A$ , and Zhu wants to know there are how many different array $B$ satisfy the following conditions?

* $1\leq B_{i} \leq A_{i}$
* For each pair( l , r ) ($1 \leq l \leq r \leq n$) , $gcd( b_{l} , b_{l+1} ... b_{r} )\ge 2$
Input
The first line is an integer T($1 \leq T \leq 10$) describe the number of test cases.

Each test case begins with an integer number n describe the size of array $A$.

Then a line contains $n$ numbers describe each element of $A$

You can assume that $1 \leq n , A_{i} \leq 10^5$
Output
For the $k$th test case , first output "Case #k: " , then output an integer as answer in a single line . because the answer may be large , so you are only need to output answer $mod$ $10^9+7$
SampleInput
1
4
4 4 4 4
SampleOutput
Case #1: 17
Submit
题目统计信息详细
总AC数9
通过人数6
尝试人数7
总提交量12
AC率50.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: