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.
Yes, I think you tried it in Python2. It worked in your IDE, perhaps because it has Python3.
You can make the code work in Python2 by replacing input().split() by raw_input().split(). You'll also need to remove parenthesis () from print() for correct result.
In case you are curious, in python3, raw_input() doesn't exist, it has been renamed to input(). Still if you want to simulate the old input() from Python2 in Python3, you can use eval(input()).
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Maximum Perimeter Triangle
You are viewing a single comment's thread. Return to all comments →
Yes, I think you tried it in Python2. It worked in your IDE, perhaps because it has Python3.
You can make the code work in Python2 by replacing
input().split()
byraw_input().split()
. You'll also need to remove parenthesis()
fromprint()
for correct result.In case you are curious, in python3,
raw_input()
doesn't exist, it has been renamed toinput()
. Still if you want to simulate the oldinput()
from Python2 in Python3, you can useeval(input())
.