public class Main {
public static int DesiredArray(int[] Arr, int N, int K) {
int sum = 0;
int count = 0;
int i = 1;
while (count < K) {
boolean divisible = false;
for (int j = 0; j < N; j++) {
if (i % Arr[j] == 0) {
divisible = true;
break;
}
}
if (!divisible) {
sum += i;
count++;
}
i++;
}
return sum;
}
Java
Special Number
public static int DesiredArray(int[] Arr, int N, int K) {
int sum = 0;
int count = 0;
int i = 1;
while (count < K) {
boolean divisible = false;
for (int j = 0; j < N; j++) {
if (i % Arr[j] == 0) {
divisible = true;
break;
}
}
if (!divisible) {
sum += i;
count++;
}
i++;
}
return sum;
}
Java
Special Number
š2
š3
š„°2š1
Cisco Answers šš
š2
Any one want projects -mini or Major š Unique projectš„š„
Domain AI/ML
contact -@ILOVEU_143 ā¤ļø
Anyone need help in GRE and TOFEL, GMAT, DUOLINGO Exam help šØāš»šØāš»
SOP , LORāš
Note -paid š¤
shareā share ā @Coding_000
Domain AI/ML
contact -@ILOVEU_143 ā¤ļø
Anyone need help in GRE and TOFEL, GMAT, DUOLINGO Exam help šØāš»šØāš»
SOP , LORāš
Note -paid š¤
shareā share ā @Coding_000
š2š„1
Free Premium Courses with Certification:
Scholarship test ā”ļø
Eligibility: Anyone can give the test
Fees: Zero
Last Date: 28th June
Register Now: https://www.codingninjas.com/studio/contests/scholarship-test-27th-to-28th-june-2023?utm_source=Growth-CS&utm_medium=RJ&utm_campaign=amigo_Hardik_28June
Scholarship test ā”ļø
Eligibility: Anyone can give the test
Fees: Zero
Last Date: 28th June
Register Now: https://www.codingninjas.com/studio/contests/scholarship-test-27th-to-28th-june-2023?utm_source=Growth-CS&utm_medium=RJ&utm_campaign=amigo_Hardik_28June
š3
Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO
Free Premium Courses with Certification: Scholarship test ā”ļø Eligibility: Anyone can give the test Fees: Zero Last Date: 28th June Register Now: https://www.codingninjas.com/studio/contests/scholarship-test-27th-to-28th-june-2023?utm_source=Growth-CS&uā¦
We are going to upload free answers for this register as soon as possible ā
š
š2š„°1
Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO
Free Premium Courses with Certification: Scholarship test ā”ļø Eligibility: Anyone can give the test Fees: Zero Last Date: 28th June Register Now: https://www.codingninjas.com/studio/contests/scholarship-test-27th-to-28th-june-2023?utm_source=Growth-CS&uā¦
Register fast guys...only 4hours left..ššā
š1