you got it accepted??
Just to check if the code-stub was right in the advanced question, I returned just 0 and submitted my code, still it gave “ABORTED” on last 3 cases.
Also for problem 1 the 3rd case had n == 1 for that, we just had to return the inputArray.
#include<bits/stdc++.h>
using namespace std;
const int m=1000009;
int sumpf[m];
int ok[m];
void solve()
{
for(int i=2;i<m;i++)
{
if(ok[i]==0)
{
sumpf[i]=i;
for(int j=2*i;j<m;j+=i)
{
sumpf[j]+=i;
ok[j]=1;
}
}
}
}
int main()
{
solve();
// cout<<sumpf[10]<<sumpf[15];
}
I heard about abort error from many of my friends on 3 test cases too, but no clue as till now why it happened.
Ya hackerrank is best…
Correct …same things happen with me in first question only 4 test case our pass but when I figured out for n equal to 1,it passes all the cases
Could you share your approach here ?
Modified Kadane’s Algorithm
During the contest, even that did not work. Atleast not for me
Does anyone know if the results are out or not??
Please let us know whenever the results are out
They are supposed to be out by this week. Stay tuned
I managed to pass all TCs after switching the language from C++ to C. C++ kept giving Abort Error.
Nice, thanks for sharing
Did anyone receive any mail from GS ?
nope have u received?
Nope. (20 characters)
Did anyone got mail from GS?
Nope (20 characters)