Здравейте това ми е кода, в VisualStudi работи и изкарва правилни резултати, тествах го и със резултати от judge, не знам къде е проблема и нямам идея. Може ли някой да удари едно рамо.
let input = [
‘20’,
‘65’
];
let print = this.print || console.log;
let gets = this.gets || ((arr, index) => () => arr[index++])(input, 0);
let sms = Number(gets());
let minutes = Number(gets());
let extraSMS = sms - 20;
let costExtraSMS = extraSMS * 0.06;
let extraMinutes = minutes - 60;
let costExtraMinutes = extraMinutes * 0.1;
let extraTax = costExtraMinutes + costExtraSMS;
let totalBill = extraTax + 12.00;
let firstLine;
let secondLine;
if (sms <= 20) {
firstLine = 0 additional messages for 0.00 levas
;
} else {
firstLine = ${extraSMS} additional messages for ${costExtraSMS.toFixed(2)} levas
;
}
if (minutes<= 60) {
secondLine = 0 additional minutes for 0.00 levas
} else {
secondLine = ${extraMinutes} additional minutes for ${costExtraMinutes.toFixed(2)} levas
;
}
print(firstLine);
print(secondLine);
print(${extraTax.toFixed(2)} additional taxes
);
print(${totalBill.toFixed(2)} total bill
);