Easy Solution but judge complexity


#1

bool isPrime(int n){

if(n == 1) return false;

for(int i = 2 ; i*i <= n ; i++ ){

    if(n%i == 0){
        return false;
    }
}

return true;

}

vector Solution::primesum(int A) {

vector<int >  B;

 for(int i = A-1 ; i >= A/2 ; i--){

    if(isPrime(i)&& isPrime(A-i)){
        
         B.push_back(A-i);
            B.push_back(i);
            break;
    }
}




return B;

}