eolymp
bolt
Try our new interface for solving problems
Problems

Value of variable 4

published at 2/26/22, 6:13:52 pm

What is theanswer?

published at 5/20/22, 2:01:50 pm

Почему у меня 90% теста только прошло???

Это JS

function functionTest(n) {

let x = Number(n);

let result01 = (2 * x - 1) / x ** 2;

let result02 = Math.sqrt(x ** 2 + 1) / 2;

let result = result01 + result02;

return parseInt(result * 1000) / 1000;

}

process.stdin.on('data', function (data) {

console.log(functionTest(data))

});