6 kyu

Polybius square cipher - encode

412 of 1,342tiriana

Description:

Implement the Polybius square cipher.

Replace every letter with a two digit number. The first digit is the row number, and the second digit is the column number of following square. Letters 'I' and 'J' are both 24 in this cipher:

1 2 3 4 5
1 A B C D E
2 F G H I/J K
3 L M N O P
4 Q R S T U
5 V W X Y Z

Input will be valid (only spaces and uppercase letters from A to Z), so no need to validate them.

Examples

"A" --> "11"
"IJ" --> "2424"
"CODEWARS" --> "1334141552114243"
"POLYBIUS SQUARE CIPHER" --> "3534315412244543 434145114215 132435231542"
Cryptography
Ciphers
Algorithms

Stats:

CreatedSep 30, 2014
PublishedSep 30, 2014
Warriors Trained2106
Total Skips129
Total Code Submissions3987
Total Times Completed1342
JavaScript Completions412
Python Completions850
Ruby Completions42
Java Completions88
Total Stars45
% of votes with a positive feedback rating94% of 230
Total "Very Satisfied" Votes203
Total "Somewhat Satisfied" Votes25
Total "Not Satisfied" Votes2
Total Rank Assessments9
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • tiriana Avatar
  • jhoffner Avatar
  • laoris Avatar
  • anter69 Avatar
  • Chrono79 Avatar
  • Reargem Avatar
  • Just4FunCoder Avatar
  • saudiGuy Avatar
Ad