Skip to content

Commit ffef2c5

Browse files
refactor 651
1 parent b9e0829 commit ffef2c5

File tree

1 file changed

+0
-33
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-33
lines changed

src/main/java/com/fishercoder/solutions/_651.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 651. 4 Keys Keyboard
5-
*
6-
* Imagine you have a special keyboard with the following keys:
7-
8-
Key 1: (A): Prints one 'A' on screen.
9-
10-
Key 2: (Ctrl-A): Select the whole screen.
11-
12-
Key 3: (Ctrl-C): Copy selection to buffer.
13-
14-
Key 4: (Ctrl-V): Print buffer on screen appending it after what has already been printed.
15-
16-
Now, you can only press the keyboard for N times (with the above four keys), find out the maximum numbers of 'A' you can print on screen.
17-
18-
Example 1:
19-
Input: N = 3
20-
Output: 3
21-
Explanation:
22-
We can at most get 3 A's on screen by pressing following key sequence:
23-
A, A, A
24-
25-
Example 2:
26-
Input: N = 7
27-
Output: 9
28-
Explanation:
29-
We can at most get 9 A's on screen by pressing following key sequence:
30-
A, A, A, Ctrl A, Ctrl C, Ctrl V, Ctrl V
31-
32-
Note:
33-
1 <= N <= 50
34-
Answers will be in the range of 32-bit signed integer.
35-
*/
363
public class _651 {
374

385
public static class Solution1 {

0 commit comments

Comments
 (0)