Ad
  • Custom User Avatar

    Oh... Nice :)
    Even without switch-case!

  • Custom User Avatar

    That's in your code not in tests, as I've just completed the C++ version and there were only few warning of comparision between unsigned long and int.

  • Custom User Avatar

    There is an UB in C++ tests.

    UndefinedBehaviorSanitizer:DEADLYSIGNAL
    ==1==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000425aa6 bp 0x000000000001 sp 0x7fff2993d670 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 0x425aa5  (/workspace/test+0x425aa5)
        #1 0x428abc  (/workspace/test+0x428abc)
        #2 0x42701e  (/workspace/test+0x42701e)
        #3 0x426a4d  (/workspace/test+0x426a4d)
        #4 0x42673b  (/workspace/test+0x42673b)
        #5 0x42d6b5  (/workspace/test+0x42d6b5)
        #6 0x425f2d  (/workspace/test+0x425f2d)
        #7 0x7f2da1f49bf6  (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
        #8 0x4048c9  (/workspace/test+0x4048c9)
    
    UndefinedBehaviorSanitizer can not provide additional info.
    ==1==ABORTING
    
  • Custom User Avatar

    Oh, y-1 it's geniously!
    I didn't though about it so

  • Default User Avatar

    youre not stupid just takes a bit of logic ill give you a hint pow()

  • Custom User Avatar

    Only quantum computers can do that or i'm so stupid