Please read the new rule regarding the restriction on the use of AI tools. It applies starting from round 972. ×

kingofworls's blog

By kingofworls, history, 2 weeks ago, In English

https://codeforces.net/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

»
2 weeks 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 :)