Redirecting to

4 Key Keyboard

1. Imagine you have a special keyboard with the following keys - 
Key 1 : Print 'X' on the screen.
key 2 : Select screen.
Key 3 : Copy selection to buffer.
Key 4 : Print buffer on screen appending to what has already been printed.
2. You are given a number N, which represents the number of times the keyboard is pressed.
3. You have to find the maximum number of 'X' that can be produced by pressing the N number of keys.
Input Format
A number N
Output Format
Check the sample output and question video.
Question Video
1 <= N <= 100
Sample Input
Sample Output

  • Asked in Companies
  • Related Topics

Video Solution

Code Solution

Id Name