Notes
This function is in beta test. Please help improve it in the issues
here.
================================================================= ==2435==ERROR: LeakSanitizer: detected memory leaks Direct leak of 480 byte(s) in 120 object(s) allocated from: #0 0x515f80 (/out/package/calc_mem+0x515f80) #1 0x51ad0b (/out/package/calc_mem+0x51ad0b) #2 0x7fa4a9c16c86 (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) Direct leak of 28 byte(s) in 7 object(s) allocated from: #0 0x515f80 (/out/package/calc_mem+0x515f80) #1 0x51b097 (/out/package/calc_mem+0x51b097) #2 0x7fa4a9c16c86 (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) Direct leak of 24 byte(s) in 6 object(s) allocated from: #0 0x515f80 (/out/package/calc_mem+0x515f80) #1 0x51b249 (/out/package/calc_mem+0x51b249) #2 0x7fa4a9c16c86 (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) Direct leak of 24 byte(s) in 6 object(s) allocated from: #0 0x515f80 (/out/package/calc_mem+0x515f80) #1 0x51b3fb (/out/package/calc_mem+0x51b3fb) #2 0x7fa4a9c16c86 (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) Direct le
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
Bad input Bad input -264 268 -1 0 Bad input Bad input Bad input -197 Bad input Bad input Not enough operands Bad input Not enough operands Bad input Bad input Bad input Bad input 108484 Bad input -347 Bad input Bad input Bad input 0 60 -169 -479 0 0 1 -105 -386 1 306 262 -3 0 238 455 3 0 -149 1 161 15 -158 -347 Not enough operands Bad input Bad input Not enough operands Not enough operands -178 Bad input -122 0 Divide by zero -122 -178 -19 Bad input 0 Bad input Not enough operands 357 Bad input -439 Bad input Bad input 1 -1 -67 417 490 0 -439 236 0 189 1 -1 -67 417 490 0 -439 Bad input Bad input 102 102 Bad input Bad input Bad input Bad input Bad input Bad input Bad input Bad input Bad input Bad input Bad input Bad input -295 Bad input Divide by zero Bad input Bad input -482 Bad input Bad input -455 -421 Bad input 134 Bad input 134 Bad input 0 165 0 286 134 134 -55 -421 455 -251 0 0 63 76 0 -357 -482 489 2 202 202 -174 -351 213 484 -281 -281 0 0 127 178 -437 -295 159796 0 383 205 -1 0 0 254 28 0 0 470 0
JOJ Answer
Bad input Bad input Bad input -264 268 0 Bad input Bad input Bad input Bad input Bad input -198 Bad input Bad input Bad input Bad input Bad input Not enough operands Bad input Not enough operands Bad input Bad input Bad input Bad input Bad input 108484 Bad input Bad input Bad input -347 Bad input Bad input Bad input Bad input Bad input Bad input Bad input Bad input Bad input -169 60 -479 0 0 -491 262 306 -3 238 455 3 149 1 161 15 -158 -347 Not enough operands Bad input Bad input Not enough operands -178 Bad input -122 0 Divide by zero -122 -178 -4 -19 Bad input Bad input 0 Bad input Not enough operands 357 Bad input Bad input -439 Bad input Bad input Bad input Bad input -67 417 490 0 -439 236 0 189 -67 417 490 0 -439 Bad input Bad input 102 102 Bad input Bad input Bad input Bad input Bad input Bad input Bad input Bad input Not enough operands Bad input Bad input Bad input Bad input Bad input Bad input Bad input Bad input