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.
- Minimum Operations 4
- Discussions
Minimum Operations 4
Minimum Operations 4
Sort by
recency
|
9 Discussions
|
Please Login in order to post a comment
So, this is apparently one of those challenges where you're supposed to be debugging existing code rather than typing up code. I saw the absolute lack of a code for Python 3, tried to build a code that solved the problem (not noticing the debugging part of the question or the "Can't change more than six lines thing"), and didn't understand why my 50-line code was running errors when it was giving the exact numerical values it was looking for. If you're having similar issues... now you know. Hope HackerRank fixes this soon, but if the age of some of these comments are saying anything, I'm not gonna hold my breath
Java 7 O(n)
Python3 code is empty, missing the standard Python script structure, which includes reading input from standard input (stdin), processing it, and then writing the output to standard output (stdout).
if name == 'main': fptr = open(os.environ['OUTPUT_PATH'], 'w')
No python 3 code to modify?
Could someone explain the logic behind this solution?