+ 1
Code Coach Security Help
Can somebody help me with the security challenge, I tried it in c++ so i would like c++ code but I would be happy with anything, thanks.
4 Respostas
+ 5
Please show us your attempt.
+ 4
Check out 👇
s=input()
a=0
for i in range(len(s)-1):
if s[i] =='#x27;or s[i]=='T':
for j in range(i+1,len(s)):
if s[j]=='G':
a=1
break
elif s[j]=='T' or s[j]=='#x27;:
a=2
break
if a==1:
print ("quiet")
break
elif a==2:
print("ALARM")
break
0
show us ur attempt
0
Ruby solution
word = gets.chomp.to_s
word_new = word.gsub("x","")
if((word_new.include? "Tquot;) ||( word_new.include? "$T"))
puts 'ALARM'
else
puts 'quiet'
end