this code is givng output as 327828114109 for input 9 instead of -1
327828114109
9
-1
problem (practice) and contest link