Record Case Detail

Notes

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

Stderr

=================================================================
==47896==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x611000000388 at pc 0x7f419b27966e bp 0x7ffd27051610 sp 0x7ffd27050db8
READ of size 201 at 0x611000000388 thread T0
    #0 0x7f419b27966d  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x5166d)
    #1 0x564c06ca58cf in RVPcalculation (/out/package/lab4+0xd8cf)
    #2 0x564c06ca356e in main (/out/package/lab4+0xb56e)
    #3 0x7f4199d99b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #4 0x564c06ca5629 in _start (/out/package/lab4+0xd629)

0x611000000388 is located 0 bytes to the right of 200-byte region [0x6110000002c0,0x611000000388)
allocated by thread T0 here:
    #0 0x7f419b306b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
    #1 0x564c06caa814 in var_RVPcalculation (/out/package/lab4+0x12814)
    #2 0x564c06ca356e in main (/out/package/lab4+0xb56e)
    #3 0x7f4199d99b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96

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

250.000000
0.500000
250.000000
62253.000000
64.000000
7091.000000
2.550000
-2490.000000
-22.350000