Interview Question
- 0of 0 votes
AnswerYou are given an array of length N that contains only integer.
- Randhir April 23, 2018 in United States
A number in this array is called a special number if it is divisible by at least one other number in the array.
Write a program to print the count of special number of array.
Input format :
First Line - N
Second line - N space separated integer.
Output format :
print the count of special number in the array.
constraints
1<= N <= pow(10,5)
Note - divisible with same number will not considered.
Example -
input
N=3
Array= 5 3 10
output
1
Description - 10 is divided by 5,
5 and 3 are not divided by any number| Report Duplicate | Flag | PURGE
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
- aifra2000 April 23, 2018