Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # S M L
- # SIMPLE => \ / \ / \ => SMLIPE
- # I P E
- import sys
- import math
- # Auto-generated code below aims at helping you parse
- # the standard input according to the problem statement.
- s = input()
- # Write an answer using print
- # To debug: print("Debug messages...", file=sys.stderr, flush=True)
- if len(s)%2:
- first = s[:len(s)//2+1]
- second = s[len(s)//2+1:]
- else:
- first = s[:len(s)//2]
- second = s[len(s)//2:]
- z=0
- f=""
- for i in range(len(s)):
- if z%2:
- f+=second[z//2]
- else:
- try:
- f+=first[z//2]
- except:
- f+=second[z//2]
- z+=1
- print(f)
- # NOTE: NOT MINE!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement