Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
2,212 views

All past online assesments of Amazon can be found using the tag "amazon_oa" in the search bar.

Here is the link : https://www.desiqna.in/tag/amazon_oa

in Online Assessments by Expert (34,270 points) | 2,212 views

1 Answer

0 like 0 dislike
Best answer
Amazon OA Questions || Intern Openings

Write a program to count the number of array elements in the range [L,R] which divides all numbers in the range [L,R].

Sample testcases
Input 1
5
2 4 8 64 16
1 4
Output 1
1
Input 2
6
4 2 4 2 4 2
1 6
Output 2
3

Anyone please help me out i was not able to paas all the test cases.

Code constraints
0 < = L < = R < = N

Output format
Displays the number of elements that divide (with remainder 0) all elements in the range L to R
by Expert (34,270 points)
selected by