#include <iostream>
#include <string>
using namespace std;
int smallest_possible_number(const string& S) {
if (S.size() == 1 && S[0] == '0') {
return -1;
}
if (S.find('1') == string::npos) {
return -1;
}
int number = 1;
int n = S.size();
for (int i = n - 1; i >= 0; --i) {
if (S[i] == '1') {
if (number % (i + 1) != 0) {
number *= (i + 1);
}
} else {
while (number % (i + 1) == 0) {
number += 1;
}
}
}
return number;
}
Base Conversion โ
#include <string>
using namespace std;
int smallest_possible_number(const string& S) {
if (S.size() == 1 && S[0] == '0') {
return -1;
}
if (S.find('1') == string::npos) {
return -1;
}
int number = 1;
int n = S.size();
for (int i = n - 1; i >= 0; --i) {
if (S[i] == '1') {
if (number % (i + 1) != 0) {
number *= (i + 1);
}
} else {
while (number % (i + 1) == 0) {
number += 1;
}
}
}
return number;
}
Base Conversion โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
#include <iostream> #include <string> using namespace std; int smallest_possible_number(const string& S) { if (S.size() == 1 && S[0] == '0') { return -1; } if (S.find('1') == string::npos) { return -1; } int number =โฆ
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll gcd(ll a,ll b) { if (b==0) return a; return gcd(b,a%b); }
ll lcm(ll a,ll b) { return a/gcd(a,b)*b; }
ll solve(string s)
{
ll n=s.size();
vector<ll>c;
for(ll i=0;i<n;i++)
if(s[i]=='1') c.push_back(i+1);
ll ans=c[0];
for(ll i=0;i<c.size();i++) ans=lcm(ans,c[i]);
if(s=="01" or c.size()==0) return -1;
return ans;
}
signed main()
{
string s; cin>>s;
cout<<solve(s);
return 0;
}
โค1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐View, Inc is hiring for Software Engineer I - QA Engineer
Experience: 0-2 years
๐Apply here: https://linkedin.com/jobs/view/3903309142/
Experience: 0-2 years
๐Apply here: https://linkedin.com/jobs/view/3903309142/
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll count(ll k,vector<ll>&a,vector<ll>&b)
{
ll n=a.size();
ll m=b.size();
unordered_map<ll,ll>mpp;
ll ans=0;
for(ll i=0;i<n;i++) mpp[__gcd(a[i],k)]++;
for(ll i=0;i<m;i++)
{
for (auto &it:mpp)
if((__gcd(b[i],k)*it.first)%k==0) ans+=it.second;
}
return ans;
}
signed main()
{
ll n,m,k; cin>>n>>m>>k;
vector<ll>a(n),b(m);
for(ll i=0;i<n;i++) cin>>a[i];
for(ll i=0;i<m;i++) cin>>b[i];
cout<<count(k,a,b);
return 0;
}
product divisibility โ
๐1
#include <stdio.h>
int main()
{
int cases,arr1[100],k=0,arr2[100];
scanf("%d",&cases);
for(int x=0;x<cases;x++)
arr2[x]=0;
for(int i=0;i<cases;i++)
{
scanf("%d",&arr1[i]);
}
for(int j=0;j<cases;j++)
{
while(arr1[j]>1)
{
if(arr1[j]%2==0)
{
arr2[k]=arr2[k]+arr1[j]/2;
arr1[j]=arr1[j]/2;
}
else
{
arr2[k]=arr2[k]+arr1[j]/2;
arr2[k]++;
arr1[j]=arr1[j]/2;
}
}
k++;
}
for(int l=0;l<cases;l++)
printf("%d\n",arr2[l]);
return 0;
}
Sports Tournament โ
int main()
{
int cases,arr1[100],k=0,arr2[100];
scanf("%d",&cases);
for(int x=0;x<cases;x++)
arr2[x]=0;
for(int i=0;i<cases;i++)
{
scanf("%d",&arr1[i]);
}
for(int j=0;j<cases;j++)
{
while(arr1[j]>1)
{
if(arr1[j]%2==0)
{
arr2[k]=arr2[k]+arr1[j]/2;
arr1[j]=arr1[j]/2;
}
else
{
arr2[k]=arr2[k]+arr1[j]/2;
arr2[k]++;
arr1[j]=arr1[j]/2;
}
}
k++;
}
for(int l=0;l<cases;l++)
printf("%d\n",arr2[l]);
return 0;
}
Sports Tournament โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Kantar is seeking MBA/PGDM students (2023-2025) who are ready to start their internships in a Market Research role across multiple locations! This is a great opportunity for those looking to gain experience in the field and work with a leading company.
If you fit the bill and are ready to start immediately, share your resume with umika.nair@kantar.com to apply. Don't miss out on this amazing opportunity!
If you fit the bill and are ready to start immediately, share your resume with umika.nair@kantar.com to apply. Don't miss out on this amazing opportunity!
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
TCS MBA Hiring Now Live!
Discover limitless opportunities with TCS MBA Off Campus Hiring for the batch of 2023 & 2024! TCS is inviting bright management postgraduates from specified specializations to set out on the path to a successful management career.
For more details and to apply, please visit: https://on.tcs.com/49zkJBy
Discover limitless opportunities with TCS MBA Off Campus Hiring for the batch of 2023 & 2024! TCS is inviting bright management postgraduates from specified specializations to set out on the path to a successful management career.
For more details and to apply, please visit: https://on.tcs.com/49zkJBy
Tcs
TCS MBA Off Campus Hiring
Inviting YOP 2023 and 2024 management graduates to apply for TCS MBA Off Campus Hiring
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Morningstar is hiring for the role Devops
Batch: 2024
๐Apply here: https://careers.morningstar.com/us/en/job/MORMORUSAP7931324EXTERNALENUS/DevOps-Engineer
Batch: 2024
๐Apply here: https://careers.morningstar.com/us/en/job/MORMORUSAP7931324EXTERNALENUS/DevOps-Engineer
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Cimpress is hiring for the role SDE
Batch: 2024
๐Apply here: https://jobs.vista.com/Cimpress-Technology/job/Mumbai-Software-Engineer-MH-400033/1155528100/
Batch: 2024
๐Apply here: https://jobs.vista.com/Cimpress-Technology/job/Mumbai-Software-Engineer-MH-400033/1155528100/
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name : Groww
Role : Frontend Engineer
Batch : 2023/2022 passouts
Link : https://docs.google.com/forms/d/e/1FAIpQLSe7tO2BWLaLcusTzQ0AdT6XFZJugKpOTt4I778EI-Kw_xYQyA/viewform?usp=send_form
Role : Frontend Engineer
Batch : 2023/2022 passouts
Link : https://docs.google.com/forms/d/e/1FAIpQLSe7tO2BWLaLcusTzQ0AdT6XFZJugKpOTt4I778EI-Kw_xYQyA/viewform?usp=send_form
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
#include<bits/stdc++.h> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; vector<int>cnt(26,0); for(auto ele: a){ cnt[ele-'A']++; } for(auto ele: b){ cnt[ele-'A']++; } for(auto ele: c){ โฆ
public static String solve(String S1, String S2, String R) {
char[] arrS1 = S1.toCharArray();
char[] arrS2 = S2.toCharArray();
char[] arrR = R.toCharArray();
Arrays.sort(arrS1);
Arrays.sort(arrS2);
Arrays.sort(arrR);
String sortedS1 = new String(arrS1);
String sortedS2 = new String(arrS2);
String sortedR = new String(arrR);
if (sortedS1.equals(sortedS2) && sortedS1.equals(sortedR)) {
return "Yes";
} else {
return "No";
}
}
Magnetic lettersโ
char[] arrS1 = S1.toCharArray();
char[] arrS2 = S2.toCharArray();
char[] arrR = R.toCharArray();
Arrays.sort(arrS1);
Arrays.sort(arrS2);
Arrays.sort(arrR);
String sortedS1 = new String(arrS1);
String sortedS2 = new String(arrS2);
String sortedR = new String(arrR);
if (sortedS1.equals(sortedS2) && sortedS1.equals(sortedR)) {
return "Yes";
} else {
return "No";
}
}
Magnetic lettersโ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
practice.geeksforgeeks.org
Contest | Job-A-Thon 32 Hiring Challenge
We made sure that over 150+ resumes of our previous contest winners were shared with more than 20+ companies and we will continue to keep helping them find their dream jobs. Register and Participate in Job-A-Thon 32 and our team will Fast-track your resumesโฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Oracle Hiring Associate Software Engineer
Experience : 0 to 2+ YOE
Link to apply!
https://careers.oracle.com/jobs/#en/sites/jobsearch/job/233846/
Experience : 0 to 2+ YOE
Link to apply!
https://careers.oracle.com/jobs/#en/sites/jobsearch/job/233846/
๐2
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Infrrd is hiring for Trainee Software Engineer
Batch: 2024
Expected Salary: 4 - 8 LPA
๐Apply here: https://infrrd.bamboohr.com/careers/125
Batch: 2024
Expected Salary: 4 - 8 LPA
๐Apply here: https://infrrd.bamboohr.com/careers/125
Infrrd
Current Openings
Take a look at the current openings at Infrrd