Блог пользователя kingofworls

Автор kingofworls, история, 3 месяца назад, По-английски

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

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
3 месяца назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

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 :)