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.
There's a bug in the 'boilerplate' code of the main function provided for the C implementation. When I read the input using scanf, this test case passes.
GDBtrace:Readingsymbolsfromsolution...done.[NewLWP10157]Corewasgeneratedby`solution'.ProgramterminatedwithsignalSIGSEGV,Segmentationfault.#0 __GI_____strtol_l_internal (nptr=nptr@entry=0xa1<error:Cannotaccessmemoryataddress0xa1>,endptr=endptr@entry=0x7ffd6aace890,base=base@entry=10,group=group@entry=0,loc=0x7f7f606fb420<_nl_global_locale>)at../stdlib/strtol_l.c:293#0 __GI_____strtol_l_internal (nptr=nptr@entry=0xa1<error:Cannotaccessmemoryataddress0xa1>,endptr=endptr@entry=0x7ffd6aace890,base=base@entry=10,group=group@entry=0,loc=0x7f7f606fb420<_nl_global_locale>)at../stdlib/strtol_l.c:293#1 0x00007f7f603713d2 in __strtol (nptr=nptr@entry=0xa1<error:Cannotaccessmemoryataddress0xa1>,endptr=endptr@entry=0x7ffd6aace890,base=base@entry=10)at../stdlib/strtol.c:106#2 0x0000000000400887 in main () at solution.c:59
2 0x0000000000400887 in main () at solution.c:59
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Equalize the Array
You are viewing a single comment's thread. Return to all comments →
There's a bug in the 'boilerplate' code of the main function provided for the C implementation. When I read the input using scanf, this test case passes.
For test case 9:
This is the error.
2 0x0000000000400887 in main () at solution.c:59