Help Bob to decrypt messages
Statement
Goal
Alice and Bob have a secret code, where each letter is swapped symmetrically (Help Bob decrypt Alice's messages.
** PLUS Bob would like to know if the message is secure or not. A message is considered as secure if at least 50% of the characters in the message (excluding newlines) are modified. **
Example:
Input:
Hi Bob, how are you? it's looking nice for our evening out,
can't wait! xoxo -Alice. ❤❤❤
Output:
Sr Yly, sld ziv blf? rg'h ollprmt mrxv uli lfi vevmrmt lfg,
xzm'g dzrg! clcl -Zorxv. ❤❤❤
Secure
Can you help Bob to decrypt messages from Alice?
Input
Line 1: An integer N for the number of lines in the message.
Next N lines: The N lines of the message to decrypt.
Next N lines: The N lines of the message to decrypt.
Output
N lines of the decrypted message
Secure (if the decrypted message is secure) / Insecure (otherwise).
Constraints
1 ≤ N ≤ 10
0 < The length of each line ≤ 250
0 < The length of each line ≤ 250
Example
Input
1 Crm xszl
Output
Xin chao Secure
Game modes
Fastest
Test cases
Example Test
Input
1
Crm xszl
Output
Xin chao
Secure
Validator Example Validator
Input
1
Svool Dliow
Output
Hello World
Secure
Special characters - secured Test
Input
1
Sr Yly, sld ziv blf? rg'h ollprmt mrxv uli lfi vevmrmt lfg, xzm'g dzrg! clcl -Zorxv. ❤❤❤
Output
Hi Bob, how are you? it's looking nice for our evening out, can't wait! xoxo -Alice. ❤❤❤
Secure
Validator Special characters - secured Validator
Input
1
R'n tllw. Dszg grnv wl blf dzmg dv nvvg glmrtsg ? ❤❤❤
Output
I'm good. What time do you want we meet tonight ? ❤❤❤
Secure
Multiple lines - secured Test
Input
6
Oryiv wv kvmhvi, wv iriv vg w'zrnvi,
Kilurgvi wvh hvxlmwvh wv ylmsvfi,
Wv kzrc, wv qlrv vg hzelri wéxrwvi,
Hzmh zfxfmv xizrmgv vg hzmh kvfi :
Hzelri wriv mlm, lhvi vg xslrhri,
Xlmhgifriv, vmgivkivmwiv vg yâgri.
Output
Libre de penser, de rire et d'aimer,
Profiter des secondes de bonheur,
De paix, de joie et savoir décider,
Sans aucune crainte et sans peur :
Savoir dire non, oser et choisir,
Construire, entreprendre et bâtir.
Secure
Validator Multiple lines - secured Validator
Input
4
Hfreiv hlm xœfi, hvh kvmhévh,
Hvh xslrc vg hvh kilkivh rwévh.
X'vhg zolih vg hvfovnvmg zrmhr,
Jfv o'lm wvervmg zxgvfi wv hz erv.
Output
Suivre son cœur, ses pensées,
Ses choix et ses propres idées.
C'est alors et seulement ainsi,
Que l'on devient acteur de sa vie.
Secure
Telephone number - unsecured Test
Input
1
(+85) 123 456 7887
Output
(+85) 123 456 7887
Insecure
Validator Telephone number - unsecured Validator
Input
1
(+84) 4444 - 5555 5
Output
(+84) 4444 - 5555 5
Insecure
Mixed Test
Input
4
Hfreiv hlm xœfi, hvh kvmhévh,
111111111
X'vhg zolih vg hvfovnvmg zrmhr,
+(123) 555-6666
Output
Suivre son cœur, ses pensées,
111111111
C'est alors et seulement ainsi,
+(123) 555-6666
Secure
Validator Mixed Validator
Input
6
Ro hfuurg wv hr kvf wv xslhv,
Fm kvf wv xlfiztv hr q'lhv.
7:15:15
Nzrh ro hfuurg wv ivwivhhvi oz gêgv,
W'zuuilmgvi xvigzrmvh zwevihrgéh,
0111001010
Output
Il suffit de si peu de chose,
Un peu de courage si j'ose.
7:15:15
Mais il suffit de redresser la tête,
D'affronter certaines adversités,
0111001010
Secure
Solution language
Solution
Stub generator input