<s> import math , pyperclip <EOL> def main ( ) : <EOL> myMessage = '<STR_LIT>' <EOL> myKey = <NUM_LIT:8> <EOL> plaintext = decryptMessage ( myKey , myMessage ) <EOL> print ( plaintext + '<STR_LIT:|>' ) <EOL> pyperclip . copy ( plaintext ) <EOL> def decryptMessage ( key , message ) : <EOL> numOfColumns = math . ceil ( len ( message ) / key ) <EOL> numOfRows = key <EOL> numOfShadedBoxes = ( numOfColumns * numOfRows ) - len ( message ) <EOL> plaintext = [ '<STR_LIT>' ] * int ( numOfColumns ) <EOL> col = <NUM_LIT:0> <EOL> row = <NUM_LIT:0> <EOL> for symbol in message : <EOL> plaintext [ col ] += symbol <EOL> col += <NUM_LIT:1> <EOL> if ( col == numOfColumns ) or ( col == numOfColumns - <NUM_LIT:1> and row >= numOfRows - numOfShadedBoxes ) : <EOL> col = <NUM_LIT:0> <EOL> row += <NUM_LIT:1> <EOL> return '<STR_LIT>' . join ( plaintext ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
