Task: | Merkkijono |
Sender: | inkeri |
Submission time: | 2018-01-18 13:45:48 +0200 |
Language: | Python3 |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.07 s | details |
#2 | WRONG ANSWER | 0.07 s | details |
#3 | WRONG ANSWER | 0.08 s | details |
#4 | WRONG ANSWER | 0.06 s | details |
#5 | WRONG ANSWER | 0.09 s | details |
Code
a = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ") b = list(input()) c = [] d = ["SWAP\n", "MOVE\n", "MOVE\nSWAP\n"] for i in range(1, 27): x = b.index(a[-i]) if x == 0: continue if x == 1: c.append(d[0]) b[0], b[1] = b[1], b[0] else: c.append(d[2] * (26 - x)) c.append(d[1]) b = [b[x]] + b[:i] + b[x+1:] + b[i:x] print(len(c)) print("".join(c))
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
ABCDEFGHIJKLMNOPQRSTUVWXYZ |
correct output |
---|
0 |
user output |
---|
52 MOVE SWAP MOVE MOVE ... |
Test 2
Verdict: WRONG ANSWER
input |
---|
ZYXWVUTSRQPONMLKJIHGFEDCBA |
correct output |
---|
923 MOVE MOVE SWAP MOVE ... |
user output |
---|
49 SWAP MOVE SWAP MOVE ... |
Test 3
Verdict: WRONG ANSWER
input |
---|
RPJMFWBHYQOTXUAENLDGZISCVK |
correct output |
---|
611 SWAP MOVE MOVE SWAP ... |
user output |
---|
52 MOVE SWAP MOVE SWAP ... |
Test 4
Verdict: WRONG ANSWER
input |
---|
GWJSPBHANMXYFLKIDORVUCEZQT |
correct output |
---|
659 MOVE SWAP MOVE SWAP ... |
user output |
---|
52 MOVE SWAP MOVE SWAP ... |
Test 5
Verdict: WRONG ANSWER
input |
---|
BJYNFLKEIUCZMQHRAXOGWPSDTV |
correct output |
---|
624 MOVE SWAP MOVE SWAP ... |
user output |
---|
52 MOVE SWAP MOVE SWAP ... |