kingofworls's blog

By kingofworls, history, 3 months ago, In English

https://mirror.codeforces.com/problemset/problem/749/A i did understood the question that we need to find the sum of primes that is equal to n and count of those primes but am not able to get the logic how to do it can anyone help me .. with the logic part

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
3 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

You can very easily do this by only using the numbers 2 and 3. If the number is even, you can only use 2, and if it is odd, you just change the last number to 3 and get the answer. Try to prove it by yourself for practice :)