Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
2
\$\begingroup\$Based on the last two test cases, if the calculated date exceeds the input year+month, it should output NA. But maybe it's good to verify with OP whether this is optional or mandatory, since just calculating beyond the current year+month works perfectly fine for larger input. 🤷\$\endgroup\$
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
complete the sentence: my question is about...
use tags that describe things or concepts that are essential, not incidental to your question
NA. But maybe it's good to verify with OP whether this is optional or mandatory, since just calculating beyond the current year+month works perfectly fine for larger input. 🤷 \$\endgroup\$