Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.

book
Back to 2021

Bill is excited about the transition from the year 2020 to 2021 and wants to represent a given number n as a sum of some number of 2020s and some number of 2021s.

Given an integer n, return YES if the number n is representable as the sum of a certain number of 2020 and a certain number of 2021 and NO in otherwise.

Example 1

Input:

4041

Output:

YES
main.cpp

main.cpp

C++

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

some-alt