Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
https://docs.codewars.com/training/troubleshooting#c-error-undefinedbehaviorsanitizer-segv-on-unknown-address-0x000000000000
UndefinedBehaviorSanitizer:DEADLYSIGNAL
==1==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000426233 bp 0x000000000022 sp 0x7fff80367370 T1)
==1==The signal is caused by a READ memory access.
==1==Hint: address points to the zero page.
==1==WARNING: invalid path to external symbolizer!
==1==WARNING: Failed to use and restart external symbolizer!
#0 0x426232 (/workspace/test+0x426232)
#1 0x428dae (/workspace/test+0x428dae)
#2 0x42743e (/workspace/test+0x42743e)
#3 0x426fbf (/workspace/test+0x426fbf)
#4 0x426c1b (/workspace/test+0x426c1b)
#5 0x42e4e5 (/workspace/test+0x42e4e5)
#6 0x4263dd (/workspace/test+0x4263dd)
#7 0x7f2c3f31abf6 (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
#8 0x405129 (/workspace/test+0x405129)
UndefinedBehaviorSanitizer can not provide additional info.
==1==ABORTING
I have this error, tell me what's this?
yes
Caught std::exception, what(): stoll
what is this? overflow ?
This comment is hidden because it contains spoiler information about the solution
Very satisfying kata given it's simple rules and interesting optimizations to make when you think through the logic of scoring. Would highly recommend this as a lesson in practical programming vs natural solutions.
Thanks bro, i found the bug and fixed it thanks to you!)
I changed tests a bit so now they should give better feedback why your test failed. Now, running your solution, I get following message:
Sample_Test
Test passed
Fixed_Test
Expected: equal to 300
Actual: 0
Random_Test
Expected: equal to 300
Actual: 100
How to fix this ?.....i'm not understand this
"Caught std::exception, what(): stoll" what is this? I passed all the test, but when i click "Attempt", i had this message......