650
订阅者
无数据24 小时
-27 天
-330 天
帖子存档
900GB PREMIUM COURSES!!
1) https://mega.nz/folder/2W5Q2YZJ
Decryption key
👇👇👇
KBiuF6zWRxOvVAjX9V3U5Q
2) Unacademy Competitive Programming DSA
https://mega.nz/folder/Rk4ggaZA#of1n9M2AfTFCTAlQRE_3AA
3) INeuron Full Stack Data Science
https://mega.nz/folder/Y11ywDoR#Cpxs51cQfJqbiIMWFfU54A
4) Front End Dev
https://mega.nz/folder/NokGXIoI#ZJBvzLc7996aEZ4J_m0uSg
WILEY EDGE exam help available 🔥💯
Book your slot
Contact here @ILOVEU_143❤️
100% clearance guarantee 🔥
Wiley Edge Graduate Recruitment
Degree B.E/ B.Tech/ M.E/ M.Tech/ BCA/MCA/B.Sc/ M.Sc
Branch CSE, ECE/EC, I.T, EEE, EIE, Mathematics, Statistics
Percentage 60% through graduation, 12th and 10th
Year of Passing 2022 and 2023 Only with No Standing Arrears
Click here to apply
👇👇
https://wileyedge.neohire.io/registration/
Share @offcampus_000✅
Telegram @whitehatcoding ❤️
Job-A-Thon 17 - Hiring Challenge
Avi Softwares Software developer
AdvaRisk data engineer
Nimap Infotec dont net
Stride Ai INC front and back-end developer
Salary range 4 to 12 LPA
Click here to apply
https://bit.ly/codewithanusha 👈
https://practice.geeksforgeeks.org/contest/job-a-thon-17-hiring-challenge
public int minDays(int D, int K) {
int[] primes = new int[K];
int sum = 0;
for (int i = 0; i < K; i++) {
primes[i] = getNthPrime(i+1);
sum += primes[i];
}
if (D <= sum) {
// D can be achieved in K days or less
return findDaysToReachConfidence(D, primes);
}
int maxRepeat = (D - sum) / primes[0];
int[] repeatDays = new int[K];
Arrays.fill(repeatDays, 1);
int remaining = D - sum - maxRepeat * primes[0];
for (int i = 0; i < maxRepeat; i++) {
int[] temp = Arrays.copyOf(repeatDays, K);
int tempRemaining = remaining;
for (int j = K-1; j >= 0; j--) {
if (tempRemaining >= primes[j] - primes[0]) {
tempRemaining -= primes[j] - primes[0];
temp[j]++;
}
}
if (tempRemaining == 0) {
return i*K + findDaysToReachConfidence(D, temp);
}
repeatDays = temp;
remaining = tempRemaining + primes[0];
}
return -1; // D cannot be achieved
}
public static int findDaysToReachConfidence(int D, int[] primes) {
int days = 0;
int i = 0;
while (D > 0 && i < primes.length) {
int q = D / primes[i];
if (q > 0) {
days += q;
D -= q * primes[i];
}
i++;
}
return D == 0 ? days : -1;
}
public static int getNthPrime(int n) {
if (n < 1) {
return -1;
}
if (n == 1) {
return 2;
}
int count = 1;
int candidate = 3;
while (count < n) {
if (isPrime(candidate)) {
count++;
}
candidate += 2;
}
return candidate - 2;
}
public static boolean isPrime(int n) {
if (n <= 1) {
return false;
}
if (n <= 3) {
return true;
}
if (n % 2 == 0 || n % 3 == 0) {
return false;
}
for (int i = 5; i*i <= n; i += 6) {
if (n % i == 0 || n % (i+2) == 0) {
return false;
}
}
return true;
}
Repost from WhiteHat Coding
Beauty code Python 👨💻
share @whitehatcoding ❤️
Sharing = Caring = Spreading Happiness 😍❤️
