diff options
Diffstat (limited to 'challenge-070/lubos-kolouch/python/ch-1.py')
| -rw-r--r-- | challenge-070/lubos-kolouch/python/ch-1.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/challenge-070/lubos-kolouch/python/ch-1.py b/challenge-070/lubos-kolouch/python/ch-1.py new file mode 100644 index 0000000000..21cbaaff44 --- /dev/null +++ b/challenge-070/lubos-kolouch/python/ch-1.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +S = "perlandraku" +C = 3 +O = 4 +N = len(S) +S = list(S) + +for i in range(1, C + 1): + x = i % N + y = (i + O) % N + S[x], S[y] = S[y], S[x] + +S = "".join(S) +print(S) |
