0

can someone tell me what I'm doing wrong? I have outputs the result of 2 tests and 1 does not read the result from the first

function main() { var distance = parseInt(readLine(), 10); //ваш код var x=590/40; console.log(x*60);} function main() { var distance = parseInt(readLine(), 10); //ваш код var y=100/40; console.log(y*60);}

17th Jun 2021, 6:48 PM
iking л
3 Respostas
+ 2
iking л Why did you write Hard Code value if you have taken input? You have to use distance instead of 590 and 100 and also you have to write single logic which will pass all test cases so do this: function main() { var distance = parseInt(readLine(), 10); console.log(distance * 60 / 40); }
17th Jun 2021, 7:01 PM
A͢J
A͢J - avatar
+ 2
I finally did it! Thank you more, I've been trying to solve this code for so long. How I've suffered.
17th Jun 2021, 7:13 PM
iking л
+ 1
😁 проще спросить, чем страдать
17th Jun 2021, 7:42 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar