All submissions for this problem are available.$Chef$ has entered into a $war$ $zone$. He wants to conquer $Pochinki$. In his mission he needs $special$ bullets to knock his enemies down. As he is busy clearing the path for his friends, he wants your help to find how many $special$ bullets he has. You are given a series of $N$ integers which represents powers of bullets. You need to find the number of $special$ bullets. A bullet is said to be $special$ if its power is $greater$ than and $divisible$ by powers of all of its $adjacent$ bullets. ###Input: - The first line of the input contains a single integer $T$ denoting the number of test cases. - The description of $T$ test cases follows. - The first line of each test case contains a single integer $N$. - The second line of each test case contains series of $N$ space-separated integers. ###Output: For each test case, print a single line containing one integer — the number of $special$ bullets. ###Constraints - $1 \leq T \leq 10$ - $2 \leq N \leq 10^5$ - Series contains non-negative integers $ \leq 10^9$ ###Sample Input: 2 5 2 4 2 8 4 6 6 2 4 1 8 3 ###Sample Output: 2 2 ###EXPLANATION: Test Case 1 : Bullet with power 4 is special because 4 is greater than and divisible by 2. Bullet with power 8 is special because 2 and 4 are less than 8 and 8 is divisible by 2 and 4. Test Case 2 : Bullet with power 6 is special because 2 is less than 6 and 6 is divisible by 2. Bullet with power 4 is special because 2 and 1 are less than 4 and 4 is divisible by 2 and 1. Bullet with power 8 is not special because it is not divisible by 3.
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, kotlin, PERL6, TEXT, SCM chicken, CLOJ, COB, FS|
Fetching successful submissions