Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- const int m[9] = {1, 2, 5, 10, 50, 100, 500, 1000, 5000};
- int main() {
- int K;
- cin >> K;
- bool flag = true;
- for (int i = 0; i < 9; ++i)
- if ((K / m[i]) % 2 == 1)
- flag = false;
- if (flag) cout << "YES" << endl;
- else cout << "NO" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement