650. 2 Keys Keyboard - Explanation

Problem Link