Ad
  • Custom User Avatar

    That's 20 1's and 10 2's. 20 + 20 = 40 total.

    We increase to size 2 after eating 4, so there's 36 left

    We increase to size 3 after eating 8 more, so there's 28 left

    We increase to size 4 after eating 12 more, so there's 16 left

    We increase to size 5 after eating 16 more, with 0 left

  • Custom User Avatar

    Asking for a kata translation is not a kata suggestion. There is a pending C++ translation here you may review it if you feel like it, but make sure they are in-line with the translating guidelines

  • Custom User Avatar

    OP solved it, closing

  • Custom User Avatar

    Notice that the first name of the given list, Sevap ends up in seat #10? This is because that's the seat in the Windowsill corner, that of the feature most desired by those family members whose last name starts with a letter in the the ancient name SSSSSSSSS. Every other member of this particular test, all starting with S will then sequentially get a seat as close to there as possible.

  • Custom User Avatar

    the first word used is "flap" (the given word)

    bob uses "clap" (now this is a used word also)

    alice can't use "flap"; as it was already used

  • Custom User Avatar

    There is no "codewars compiler". It's just Clang. You can find more info about C++ runtime here: https://docs.codewars.com/languages/cpp

  • Custom User Avatar

    Hi there.

    The C++ translation has been around for ~5 years, and successfully completed 75 times so far. There may be some issues, but none related to the compiler or giving incorrect results (to my knowledge).

    Being the author of this kata, I can see your current code, so I copied it and ran it. For the message "D=b*b-4*a*c", the expected result is "#3****#22*-22**4-*-2*-222", but your code returned "#3****#222222**4-4-22222". I can immediately see that there is an issue with this result: after typing D= ("#3****"), you're correctly switching to lowercase, but then you're clicking button 2 6 times, when only 2 are required to output letter "b".

    Make sure to debug your solution. On CodeWars, you can print things to console and they will show up. You can get more tips by reading this article: https://docs.codewars.com/training/troubleshooting

    Let me know if you have any other questions related to this.

  • Custom User Avatar

    I'm not sure I understood your question :/ To type *, you have to hold the button (*-). If you're asking about which buttons are on that sign, it's '-+= (shown in diagram). If you have any questions, it would be faster/easier for me to answer on Discord.

  • Custom User Avatar
  • Custom User Avatar

    You, sir, win the internet :)

  • Custom User Avatar

    bob has a plan for that

  • Custom User Avatar

    NOBODY WILL EVER WANT TO ANSWER TO YOU IF YOU KEEP SCREAMING LIKE THAT!!!

  • Custom User Avatar

    The code terminates when it reaches the last word of the string. (i.e, all comparisons with previous neighboring word have been done)

    OP solved it, closing

  • Custom User Avatar

    The moves do not occur for substrings having equal sizes.

    You might have seen the test case below and got confused.

    "who hit retaining The That a we taken"

    But, we start comparing from the 2nd word (1st-index) with the 3rd word (2nd-index). Clearly, the 2nd word is shorter than the 3rd, so we swap their positions. Kindly refer to the example in description for clarity.

  • Custom User Avatar

    you might be trying to convert empty string to number. I had same issue.

  • Loading more items...