1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
Task 1: "Excel Column
Write a script that accepts a number and returns the Excel Column Name
it represents and vice-versa.
Excel columns start at A and increase lexicographically using the 26
letters of the English alphabet, A..Z. After Z, the columns pick up an
extra letter, going from AA, AB, etc., which could (in theory)
continue to an arbitrary number of digits. In practice, Excel sheets
are limited to 16,384 columns.
Example
Input Number: 28
Output: AB
Input Column Name: AD
Output: 30
"
My notes: very straightforward.
Task 2: "Find Numbers
Write a script that accepts list of positive numbers (@L) and two positive
numbers $X and $Y.
The script should print all possible numbers made by concatenating the
numbers from @L, whose length is exactly $X but value is less than $Y.
Example
Input:
@L = (0, 1, 2, 5);
$X = 2;
$Y = 21;
Output:
10, 11, 12, 15, 20
"
My notes: sounds quite straightforward. I note that "01" is not a solution,
so leading zeroes aren't allowed.
|