Notes
This function is in beta test. Please help improve it in the issues
here.
================================================================= ==6349==ERROR: LeakSanitizer: detected memory leaks Direct leak of 48 byte(s) in 2 object(s) allocated from: #0 0x516fc0 (/out/package/test_part1_memcheck+0x516fc0) #1 0x5212bd (/out/package/test_part1_memcheck+0x5212bd) #2 0x521c3a (/out/package/test_part1_memcheck+0x521c3a) #3 0x7fb5d558ab96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) Indirect leak of 48 byte(s) in 2 object(s) allocated from: #0 0x516fc0 (/out/package/test_part1_memcheck+0x516fc0) #1 0x5212bd (/out/package/test_part1_memcheck+0x5212bd) #2 0x521245 (/out/package/test_part1_memcheck+0x521245) #3 0x521c3a (/out/package/test_part1_memcheck+0x521c3a) #4 0x7fb5d558ab96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) Indirect leak of 24 byte(s) in 1 object(s) allocated from: #0 0x516fc0 (/out/package/test_part1_memcheck+0x516fc0) #1 0x5212bd (/out/package/test_part1_memcheck+0x5212bd) #2 0x521245 (/out/package/test_part1_memche
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
1996 -906 1627 409 -257 -1112 -1467 1684 -1516 863 -1714 -1966 1636 626 -146 -255 -1667 -1883 771 190 -1661 617 -258 -1985 1980 -560 -1831 1106 1863 964 897 242 -414 -1931 -1754 -1042 742 -498 -1110 -1922 1562 -1259 665 396 1809 663 367 -181 978 -366 1128 918 1335 -236 -810 -363 737 -897 1434 -1238 1516 -348 -815 -1369 -985 -1642 601 1008 -692 476 -145 -1320 42 -1611 -285 -1372
JOJ Answer
1996 -906 1627 409 -257 -1112 -1467 1684 -1516 863 -1714 -1966 1636 626 -146 -255 -1667 -1883 771 190 -1661 617 -258 -1985 1980 -560 -1831 1106 1863 964 897 242 -414 -1931 -1754 -1042 742 -498 -1110 -1922 1562 -1259 665 396 1809 663 367 -181 978 -366 1128 918 1335 -236 -810 -363 737 -897 1434 -1238 1516 -348 -815 -1369 -985 -1642 601 1008 -692 476 -145 -1320 42 -1611 -285 -1372