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);}
3 Answers
+ 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);
}
+ 2
I finally did it! Thank you more, I've been trying to solve this code for so long. How I've suffered.
+ 1
š ŠæŃŠ¾Ńе ŃŠæŃŠ¾ŃŠøŃŃ, ŃŠµŠ¼ ŃŃŃŠ°Š“аŃŃ