ATS resume help
Ir al canal en Telegram
WhatsApp Me https://wa.me/917674087200 ✅ ATS-Friendly Resumes ✅ Higher Interview Calls ✅ Free Tips + Templates
Mostrar más3 694
Suscriptores
-224 horas
-217 días
-8330 días
Archivo de publicaciones
3 694
#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll mod = 1e9+7;
int gcd(int a, int b)
{
if(a == 0) return b;
return gcd(b%a, a);
}
int main()
{
int n;
cin >> n;
vector<int> arr(n);
for(int i = 0; i < n; i++) cin >> arr[i];
for(int i = 1; i < n; i++)
{
bool flag = true;
for(int j = 0; j < i; j++)
{
for(int k = i; k < n; k++)
{
if(gcd(arr[j], arr[k]) > 1)
{
flag = false;
break;
}
}
if(flag == false) break;
}
if(flag)
{
cout << i;
return 0;
}
}
cout << n;
return 0;
}
3 694
we will post all solutions 😊
@CodingPalace❤️ @CodingPalace
share ✅ share ✅ share✅ our channel 😊
Show some love and support guys😁😁😊👍👍
