+ 1

Error in security challenge

I tried to solve security challenge, and I did, but the third input in the challenge don't was right, for this I swap the output for seeing if there was an error, and it there was, it wants the "quiet" output, where the the output should be "ALARM". Now I don't know if it's an upload fault, but this is an error, for this if someone found a solution for this problem, please tell me. (And tell me also if it isn't an error and my code could be bad)

7th Nov 2020, 4:01 PM
Francesco Manuel Ursini
Francesco Manuel Ursini - avatar
6 Respostas
+ 9
Francesco Manuel Ursini , could you please mention the programming languag? Thnks!
7th Nov 2020, 7:26 PM
Lothar
Lothar - avatar
+ 4
Lothar probably python
7th Nov 2020, 9:09 PM
Davide
Davide - avatar
+ 3
Francesco Manuel Ursini post your attempt
7th Nov 2020, 4:59 PM
Davide
Davide - avatar
10th Nov 2020, 2:53 PM
Francesco Manuel Ursini
Francesco Manuel Ursini - avatar
+ 2
Davide this is the code : from re import findall x = input() y = r"[G$Tx]" z = findall(y, x) n2 = z.index("
quot;) n3 = z.index("T") a = z[n2:n3] if "G" in a : print("quiet") else: print("ALARM")
10th Nov 2020, 2:55 PM
Francesco Manuel Ursini
Francesco Manuel Ursini - avatar
0
i filtered all the x's away, and got for example 'GG$GT'. Then i did a for loop in which i xored floor[i] with floor[i+1], the nice thing about xor is that xoring 'T' with '
#x27; and '
#x27; with 'T' gives you the same result ('p'). so if there is a 'p' in the result, the output should be 'ALARM'.
4th Dec 2020, 11:11 AM
Igor Bezverhi
Igor Bezverhi - avatar