ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1877. Bicycle Codes

Accepted
Posted by mylyt 17 Nov 2018 19:56
/*
by thinking the combinations of the two locks,we get if the password number for lock1 is even or password number for lock2 is odd, the theif could open the lock.

I guess that would be the easiest ideal,right?
*/

#include <iostream>
using namespace std;

int main() {
    int lock1, lock2;
    cin >>lock1 >>lock2;

    if (lock1 % 2 == 0 || lock2 % 2 != 0)
        cout << "yes" << endl;
    else
        cout << "no" << endl;
    return 0;
}