Ad
  • Default User Avatar

    i just tried the second solution, in timed out

  • Default User Avatar

    i literally copied a solution and it didnt work, execution timed out.
    i tried my solutions but i was slow for large number like 9999999999. then i upgraded it but random number were bigger (1003427533368395383) and my solution couldnt kepp up, so frustrated i check the solution (i was on the right path but i was missing some detail) and i tried it, and it failed with a even larger number (4802419968590657004)
    just to know the random test isnt even random, it generate the same big number over and over

  • Default User Avatar

    thanks man, didnt think about that

  • Default User Avatar

    its happening something strange, my code seems to work, i pass the test but when i submit it, it fails the same layout as the test. it doesnt make sense tho.
    i logged the input field so i know they are equal

  • Default User Avatar

    main.cpp:44:22: warning: comparison of integers of different signs: 'int' and 'std::vector::size_type' (aka 'unsigned long') [-Wsign-compare]
    for (auto i= 0; i<prime.size(); i++){
    ~^~~~~~~~~~~~~
    main.cpp:45:26: warning: comparison of integers of different signs: 'int' and 'std::vector::size_type' (aka 'unsigned long') [-Wsign-compare]
    for (auto j= i; j<prime.size(); j++){
    ~^~~~~~~~~~~~~
    main.cpp:53:22: warning: comparison of integers of different signs: 'int' and 'std::vector::size_type' (aka 'unsigned long') [-Wsign-compare]
    for (auto i= 0; i<prime.size(); i++){
    ~^~~~~~~~~~~~~
    main.cpp:54:26: warning: comparison of integers of different signs: 'int' and 'std::vector::size_type' (aka 'unsigned long') [-Wsign-compare]
    for (auto j= i; j<prime.size(); j++){
    ~^~~~~~~~~~~~~
    main.cpp:66:20: warning: unused function 'SumOfDivided' [-Wunused-function]
    static std::string SumOfDivided(std::vector &lst){
    ^
    5 warnings generated.
    /tmp/main-1d7c7a.o: In function sumOfDivided_Tests::Fixed_Tests()': main.cpp:(.text._ZN18sumOfDivided_Tests11Fixed_TestsEv[_ZN18sumOfDivided_Tests11Fixed_TestsEv]+0x5c): undefined reference to SumOfDivided::sumOfDivided[abi:cxx11](std::vector<int, std::allocator >&)'
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    can't understand whats wrong, it worked in my editor. i understand the first 4 warning but not the 5th