Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @Jnath,validated by @flopy78,@LoicGestin and @AlexMtz.
If you have any issues, feel free to ping them.
Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @Jnath,validated by @flopy78,@LoicGestin and @AlexMtz.
If you have any issues, feel free to ping them.
Hello fellow agents, every time I test my solution, I get following console output:
Oops β¦ a system error has occured!
Maybe some sabotage from the enemy?
Proceed with caution.
Yes, the bug has been reported here and in the Discord forum.
So it is really a sabotage? Wow, we must be in something bigβ¦
(Sorry, I got carried away )
The puzzle states that the key is always positive and the solution to the first test case is 3. But Iβm pretty sure it is -3 because you have to subtract 3 from every character to get the right result
The original shift for encryption (i.e. the key) is positive. Now you are doing the reverse process (i.e. decryption) to determine the original shift.
Oh okay. You have to output the key used for encryption, not decryption. Thanks
126β32(+1)=95
Thus β3 is +92.
In test9, I find that the key is 94, not 93.
Why?
Too bad for this error, I achieved to do the puzzle with a lot of patience. Every time I got a system error, I was replaying the test case. But the validators seem to be impacted too and the reproduce rate is around 75% (empiric data from my own personal experience). So itβs impossible to submit and get at least one validator green. I think we should get an update when the bug is fixed
93 is the correct answer!
When you do
Chr (((Ord (Enter) - 32 - Key) mod 95) + 32) to decode
you are going to have a negative value, you must do
Chr (((Ord (Enter) - 32 - Key + 950) mod 95) + 32)
Sorry for the Pascal Language
((InputChar - 32 - Key + 950) % 95) + 32
Same Error in tests but the submit works fine.
If you take the first character for example : A here.
A is 65 in ASCII If we add the key to encode we got 158. With the warping around we know that β127 is 32β 158-127=31. And 31+32=63. And the 63 char is ?. (Same as the input)
In the hope that this will lead to a better understanding.
There is no negative number in modular integers.
Test 8 is OK, not test 9.
Moreover, 950=0 mod 95.
Got it: you have to find the full word.
Hi,
Whatβs the difference between test 3 and validator 3 ?
Everything is ok except this validator!
Thx !
Same word, different ciphertext.
Are you applying the rules for separating words as described in the text? I was failing validator 3 because Iβd not read that properly and included some other characters (brackets).
If you think about βWords are always separated by SP, , ., ?, ;, : and !β, itβs ok.
the word separation rules are respected in the range of ascii codes from 32 to 126, I failed validator 3 what is the exception for this validation scenario?
Tokenization of a line can be tricky. Some hints:
Given hint word must be strictly matched.
If the hint is βtestβ and you find βtestsβ in a result, this is not a match.
Apple != apple
Given hint word must be strictly followed in upper/lower cases.
Token chars ( ,.?;:!) will never be included in a word.
Examples:
βhi, bye!β makes two words, βhiβ and βbyeβ. βbye!β is not a word.
β#include <stdio.h>β makes 3 words β#includeβ, β<stdioβ and βh>β.
If you find two ways of decryption produce results both including the hint word, you are bad luck because this is an undefined situation in the puzzle. You can complain to the author.
If you find a decryption produce multiple matches to the given hint word, it is allowed.
Example: hint word is βtheβ and there are several βtheβ in the tokenized decrypted line. It is valid.
Should I swap test 3 and validator 3 ?