Deepak and Primes @ test cases not passing

HELLO IN THIS PROBLEM FIRST 2 TEST CASES ARE NOT PASSING CAN YOU TELL ME WHY?? I HAVE ENTERED ALL THE CONSTRAINS PROPERLY.KINDLY EDIT MY CODE AND PLS EXPLAIN …https://ide.codingblocks.com/s/157412

kindly solve the doubt

Hi @Madhavendra-Gupta-2240591552663161

#include <bits/stdc++.h>
using namespace std;

bool v[100000005];
vectorprime_vector;

void primecal()
{
for(long long i = 2; i < 100000005; i += 2){
v[i]=true;
}

prime_vector.push_back(2);

for (long long i = 3; i < 100000005; i += 2){
    
	if (!v[i]){
		
		prime_vector.push_back(i);

        for (long long j = i; (j*i) < 100000005; j += 2){
            if (!v[j*i])    
                v[j*i] = true;
        }
    }
}

}

int main()
{
int k;
primecal();

cin>>k;

cout<<prime_vector[k-1];

return 0;
}

This is a better approach in which after calculating all the primes we are there and then pushing all the prime in the vector.

Your code was not showing output for those inputs where some variables where getting out of the range of int

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.