Здравейте, в Джъдж получавам само 20/100, а локално всичко работи както трябва.
Write a program that determines the color of a chessboard square based on its Label and Rank
- Labels have values from
 atoh- Ranks have values from
 1to8
Input
- On the first line, you will receive L - the label
 - On the second line, you will receive R - the rank
 Output
- On the only line of output, print
 lightordark, based on your calculationsConstraints
a<= L <=h1<= R <=8Input
a 1Output
darkInput
f 3Output
light
Може ли да ми помогнете да открия проблема, ето го и решението:
const getGets = (arr) => {
    let index = 0;
    return () => {
        const toReturn = arr[index];
        index += 1;
        return toReturn;
    };
};
const test = [
    'g',
    1,
];
const gets = this.gets || getGets(test);
let print = this.print || console.log;
let label = gets();
let rank = gets();
let labels = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'];
let ranks = [1, 2, 3, 4, 5, 6, 7, 8];
let labelId = labels.indexOf(label.toLowerCase());
let rankId = ranks.indexOf(rank);
if (labelId % 2 == 0) {
    if (rankId % 2 == 0) print('dark');
    else print('light');
} else if (labelId % 2 == 1) {
    if (rankId % 2 == 0) print('light');
    else print('dark');
}
            