| Task: | Merkkijono |
| Sender: | inkeri |
| Submission time: | 2018-01-18 14:54:15 +0200 |
| Language: | Python3 |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | RUNTIME ERROR | 0 |
| test | verdict | time | |
|---|---|---|---|
| #1 | RUNTIME ERROR | 0.09 s | details |
| #2 | RUNTIME ERROR | 0.08 s | details |
| #3 | RUNTIME ERROR | 0.09 s | details |
| #4 | RUNTIME ERROR | 0.07 s | details |
| #5 | RUNTIME ERROR | 0.07 s | details |
Code
a = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
b = list(input())
c = []
n = 0
d = ["SWAP\n", "MOVE\n", "MOVE\nSWAP\n"]
for i in range(25, 0, -1):
z = b.index(a[i])
if z != 0:
c.append(d[1] * (26 - z))
n += (26 - z)
b = b[z:] + b[:z]
y = b.index(a[[i + 1, 0][i == 25]])
if y != 1:
c.append(d[2] * (26 - y))
n += 2 * (26 - y)
b = [b[0]] + b[y:] + b[1:y]
c.append(d[1])
n += 1
b.insert(0, b.pop())
input()
print("".join(b))
print(n)
print("".join(c))
Test details
Test 1
Verdict: RUNTIME ERROR
| input |
|---|
| ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| correct output |
|---|
| 0 |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "input/code.py", line 22, in <module>
input()
EOFError: EOF when reading a lineTest 2
Verdict: RUNTIME ERROR
| input |
|---|
| ZYXWVUTSRQPONMLKJIHGFEDCBA |
| correct output |
|---|
| 923 MOVE MOVE SWAP MOVE ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "input/code.py", line 22, in <module>
input()
EOFError: EOF when reading a lineTest 3
Verdict: RUNTIME ERROR
| input |
|---|
| RPJMFWBHYQOTXUAENLDGZISCVK |
| correct output |
|---|
| 611 SWAP MOVE MOVE SWAP ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "input/code.py", line 22, in <module>
input()
EOFError: EOF when reading a lineTest 4
Verdict: RUNTIME ERROR
| input |
|---|
| GWJSPBHANMXYFLKIDORVUCEZQT |
| correct output |
|---|
| 659 MOVE SWAP MOVE SWAP ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "input/code.py", line 22, in <module>
input()
EOFError: EOF when reading a lineTest 5
Verdict: RUNTIME ERROR
| input |
|---|
| BJYNFLKEIUCZMQHRAXOGWPSDTV |
| correct output |
|---|
| 624 MOVE SWAP MOVE SWAP ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "input/code.py", line 22, in <module>
input()
EOFError: EOF when reading a line