We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Determining DNA Health
Determining DNA Health
Sort by
recency
|
255 Discussions
|
Please Login in order to post a comment
JavaScript:
Hi, I am using JavaScript. I keep getting wrong output. Can anyone help with that. Thanks.
"use strict";
process.stdin.resume(); process.stdin.setEncoding("utf-8");
let inputString = ""; let currentLine = 0;
process.stdin.on("data", function (inputStdin) { inputString += inputStdin; });
process.stdin.on("end", function () { inputString = inputString.split("\n");
});
function readLine() { return inputString[currentLine++]; }
function main() { const n = parseInt(readLine().trim(), 10);
}
js
Passes all test cases in C++. Was having issues with some test cases as I was using
INT_MAX
as the initial worst case despite using unsigned longs everywhere, when the test case's worst case was higher than that. Switching toULONG_MAX
worked.Best I could get in Python, but 6 testcases still timing out: