function solution (input){
let typeCruise=input.shift();
let typeCabine=input.shift();
let countNights=Number(input.shift());
totalPrice=0;
switch(typeCruise){
case"Mediterranean":
switch(typeCabine){
case "standard cabin":totalPrice=countNights*27.5; break;
case "cabin with balcony":totalPrice=countNights*30.20;break;
case "apartment":totalPrice=countNights*40.50;break;
}break;
case"Adriatic":
switch(typeCabine){
case "standard cabin":totalPrice=countNights*22.99; break;
case "cabin with balcony":totalPrice=countNights*25.00;break;
case "apartment":totalPrice=countNights*34.99;break;
}break;
case"Aegean":
switch(typeCabine){
case "standard cabin":totalPrice=countNights*23.00; break;
case "cabin with balcony":totalPrice=countNights*26.60;break;
case "apartment":totalPrice=countNights*39.80;break;
}break;
}
if (countNights>7){
totalPrice=totalPrice*0.75;
}
console.log(`Annie's holiday in the ${typeCruise} sea costs ${(totalPrice*4).toFixed(2)} lv.`);
}
solution([ 'Adriatic', 'apartment', '5', '' ]);
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}