uz
Feedback
Codeforces|Leetcode|Codechef free solutions

Codeforces|Leetcode|Codechef free solutions

Kanalga Telegram’da oβ€˜tish

Free codeforces, Codechef, Leetcode solutions are available 😍😍😍😍😍😍 Helped More than 200+ students to crack coding round in 2022 and helped placed them in Good companies. πŸ₯³πŸ₯³πŸ₯³πŸ€©πŸ€©πŸ€© Dm @Cpsoln if you want help in coding round.

Ko'proq ko'rsatish
4 317
Obunachilar
Ma'lumot yo'q24 soatlar
-137 kunlar
-5230 kunlar
Postlar arxiv
Do you want today's leetcode biweekly contest codes for free?
Anonymous voting

De shaw subarray done βœ…βœ…βœ… weighed directed tree βœ…βœ…βœ…

De shaw codes done Dm @Cpsoln

Limited slots left dm fast

Today's DE shaw slots available Dm @Cpsoln

Dm fast for Amazon ML summer school Limited slots

Info edge slots available Dm @Cpsoln

Pattern of Amazon ML summer school: 2 coding ques 30 mcqs

DE shaw slots available Dm @Cpsoln

Salesforce slots available Dm @Cpsoln

McKinley rise slots available Dm @Cpsoln

Code with cisco slots available

Amazon ML school os slots available Dm @Cpsoln

Dm @Cpsoln for any coding round.

Destroying bridge

It is sum of N

React krdo guys 😊😊 Motivation milta hai

C code 😊

#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <class T> using o_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define int long long typedef pair<int, int> II; typedef vector<II> VII; typedef vector<int> VI; typedef vector<VI> VVI; #define PB push_back #define F first #define S second #define ALL(a) a.begin(), a.end() #define SET(a, b) memset(a, b, sizeof(a)) #define SZ(a) (int)(a.size()) #define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i) #define fast_io ios_base::sync_with_stdio(false); cin.tie(NULL) #define endl "\n" const long long mod = 1e9 + 7; #define MAXN (int)1e6 + 5 vector<int> primes; bitset<MAXN + 5> isPrime; vector<int> spf(MAXN + 5, 1e9); void getPrimes() { iota(ALL(spf), 0); isPrime.set(); isPrime[0] = isPrime[1] = 0; for (int i = 2; i <= sqrt(MAXN) + 2; i++) { if (isPrime[i]) { primes.push_back(i); for (int j = i * i; j <= MAXN; j += i) { isPrime[j] = 0; spf[j] = min(spf[j], i); } } } FOR(i, sqrt(MAXN) + 3, MAXN) if (isPrime[i]) primes.PB(i); } VI pf; void solve() { int n; cin >> n; int indx = upper_bound(ALL(primes), spf[n]) - primes.begin(); indx--; int prod = n * (pf[indx]); cout << prod << endl; } signed main() { fast_io; int totalTests; cin >> totalTests; getPrimes(); pf.assign(SZ(primes), 0); FOR(i, 0, SZ(primes)) { pf[i] = primes[i]; if (i) pf[i] += pf[i - 1]; } for (int testNo = 1; testNo <= totalTests; testNo++) { solve(); } return 0; }