Record Case Detail

Notes

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

Stderr

=================================================================
==4792==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffcd5aa834f at pc 0x55be5aeaa65f bp 0x7ffcd5aa5630 sp 0x7ffcd5aa5620
READ of size 1 at 0x7ffcd5aa834f thread T0
    #0 0x55be5aeaa65e in RPE (/out/package/lab5+0xe65e)
    #1 0x55be5aea5ae4 in main (/out/package/lab5+0x9ae4)
    #2 0x7fc78129fc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #3 0x55be5aea6449 in _start (/out/package/lab5+0xa449)

Address 0x7ffcd5aa834f is located in stack of thread T0 at offset 10495 in frame
    #0 0x55be5aea549f in main (/out/package/lab5+0x949f)

  This frame has 6 object(s):
    [32, 512) 'variable'
    [544, 10144) 'rpe'
    [10176, 10296) 'str'
    [10336, 10456) 'variablepart'
    [10496, 11696) 'calculation' <== Memory access at offset 10495 underflows this variable
    [11744, 12944) 'helper'
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp an

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

0.010000
250.000000
250.000000
62253.000000
64.000000
7091.000000
2.550000
-22.350000