vnyalla68's blog

By vnyalla68, history, 3 years ago, In English

https://codeforces.com/problemset/problem/72/A

hello everyone im a newbie and im having a doubt in this question im coding in c++ pls i need hlp in this thnq

  • Vote: I like it
  • -20
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Let's do dp: dp[x] — Is x a good number. So, how we can count dp[x]: Let's scan over prime numbers <= x: a — current prime number. If dp[x — a] is true => dp[x] is true. Then we retrieve the answer.