### juice04's blog

By juice04, history, 2 months ago,

I was trying to solve this question using smallest prime factor sieve. but i'm encountering a runtime error on my submission. could someone pls take a look into it and point the error out (FYI, it ran perfectly on my system IDE). tyvm in advance.

• 0

 » 2 months ago, # | ← Rev. 2 →   +1 You created a vector of size 10^9 . That is not possible in c++
•  » » 2 months ago, # ^ |   0 alright thank you, could you please suggest an alternative if you can?
•  » » » 2 months ago, # ^ | ← Rev. 5 →   +1 just try to solve it$$x+y=n$$ $$y= k*x$$ $$=> n= (k+1)*x$$we just need k to find the value of x & ysince (k+1) is one of the divisor of n we just search for the suitable value of k in the divisorsfor even numbers k=1 => x=yyou can refer to my solution click here
•  » » » » 2 months ago, # ^ |   0 Thanks a Ton!
•  » » » » 2 months ago, # ^ |   0 Can you Please Explain , how you come to conclusion y = k * x ? please