|
|
back to boardAccepted 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; } |
|
|