Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The Input of http://pastebin.com/NLDbsStu is: "IF YOU CANT CHANGE YOUR MIND THEN YOURE NOT USING IT".
- Code #1 is the simpler of the two, but is also similar to the 3rd code.
- This code is also very picky & not very good to be honest.
- You can't encode words that contain multiple instances of the same letter, (Good, hello, test).
- Since each word when encoded outputs to 26 characters long, There's a very small amount of words you can encode before needing to output to another set of 26 characters.
- The only reason I used this code for this challenge was because it was only meant for the challenge, nothing else.
- Step by step of Encoding:
- Input: "The Word"
- 1. Think of the output, 26 characters, as positions.
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- 2. The letters represent the order, So now we need to assign the ordering to our input:
- Input: T H E
- Order: A B C
- Input: W O R D
- Order: A B C D
- 2. Knowing the number form of letters, A=1,B=2,C=3...Z=26, We now place the order letter in the position of the letter's number.
- (T)HE _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ A _ _ _ _ _ _
- (A)BC
- (TH)E _ _ _ _ _ _ _ B _ _ _ _ _ _ _ _ _ _ _ A _ _ _ _ _ _
- (AB)C
- (THE) _ _ _ _ C _ _ B _ _ _ _ _ _ _ _ _ _ _ A _ _ _ _ _ _
- (ABC)
- To speed things up:
- (THE) _ _ _ _ C _ _ B _ _ _ _ _ _ _ _ _ _ _ A _ _ _ _ _ _
- (ABC)
- (WORD) _ _ _ D _ _ _ _ _ _ _ _ _ _ B _ _ C _ _ _ _ A _ _ _
- (ABCD)
- 3. Now for the repetitive letters, Once the Order letters have been positioned you repeat those letters to the left as much as you can until it meets a different Order letter.
- (T)HE _ _ _ _ C _ _ B A A A A A A A A A A A A _ _ _ _ _ _
- (A)BC
- (TH)E _ _ _ _ C B B B A A A A A A A A A A A A _ _ _ _ _ _
- (AB)C
- Once it reaches the end, it will just repeat and wrap around:
- (THE) C C C C C B B B A A A A A A A A A A A A C C C C C C
- (ABC)
- To speed things up:
- (THE) C C C C C B B B A A A A A A A A A A A A C C C C C C
- (ABC)
- (WORD) D D D D B B B B B B B B B B B C C C A A A A A D D D
- (ABCD)
- That's all there is to this code. :D
- Thanks for participating for Code #1! :D
- - DWC
- ----------------------------------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment