Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

/in/lab4.c:50:25: runtime error: index 100 out of bounds for type 'char [100]'
/in/lab4.c:50:30: runtime error: store to address 0x563ff13ab5a4 with insufficient space for an object of type 'char'
0x563ff13ab5a4: note: pointer points here
  64 29 2a 64 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
              ^ 
=================================================================
==49506==ERROR: AddressSanitizer: global-buffer-overflow on address 0x563ff13ab5a4 at pc 0x563ff1196093 bp 0x7fffb00e94b0 sp 0x7fffb00e94a0
WRITE of size 1 at 0x563ff13ab5a4 thread T0
    #0 0x563ff1196092 in main (/out/package/lab4+0xb092)
    #1 0x7f774d70eb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #2 0x563ff11961e9 in _start (/out/package/lab4+0xb1e9)

0x563ff13ab5a4 is located 0 bytes to the right of global variable 'commands' defined in '/in/lab4.c:4:6' (0x563ff13ab540) of size 100
SUMMARY: AddressSanitizer: global-buffer-overflow (/out/package/lab4+0xb092) in m

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


        

JOJ Answer

Show the results!
a * b = 70.910000, b - c  + a * f = 13932.010000
ans = -7062633.450000