Notes
This function is in beta test. Please help improve it in the issues
here.
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Time Exceeded. And the exit code of your program is -9, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
mumsh $ mumsh $ success mumsh $ p1m2.c:54:27: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned long' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior p1m2.c:54:27 in p1m2.c:54:4: runtime error: index 18446744073709551615 out of bounds for type 'char [1030]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior p1m2.c:54:4 in p1m2.c:54:4: runtime error: addition of unsigned offset to 0x7fff2d431940 overflowed to 0x7fff2d43193f SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior p1m2.c:54:4 in ================================================================= ==35531==ERROR: AddressSanitizer: stack-buffer-underflow on address 0x7fff2d43193f at pc 0x0000005155de bp 0x7fff2d431910 sp 0x7fff2d431908 WRITE of size 1 at 0x7fff2d43193f thread T0 #0 0x5155dd (/out/package/mumsh_memory_check+0x5155dd) #1 0x7f37318b6b96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #2 0x41cc69 (/out/package/mumsh_memory_check+0x41cc69) Address 0x7fff2d43193f is located in
JOJ Answer
mumsh $ mumsh $ success mumsh $ exit