結果

問題 No.26 シャッフルゲーム
ユーザー yohei-kuyohei-ku
提出日時 2018-03-16 00:40:06
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 315 bytes
コンパイル時間 119 ms
コンパイル使用メモリ 6,688 KB
実行使用メモリ 6,236 KB
最終ジャッジ日時 2023-08-23 11:30:56
合計ジャッジ時間 1,074 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,236 KB
testcase_01 AC 10 ms
5,964 KB
testcase_02 AC 11 ms
6,192 KB
testcase_03 AC 11 ms
5,964 KB
testcase_04 AC 11 ms
5,900 KB
testcase_05 AC 11 ms
6,112 KB
testcase_06 AC 11 ms
6,124 KB
testcase_07 AC 11 ms
5,928 KB
testcase_08 AC 12 ms
6,048 KB
testcase_09 AC 11 ms
5,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
M = input()
A = [0,0,0]
A[N-1] = "A"
a,b,c = 0,0,0

for i in range(0,M):
    first = raw_input()
    split_first = first.split()
    a = int(split_first[0])
    b = int(split_first[1])
    c = A[b-1]
    A[b-1] = A[a-1]
    A[a-1] = c
    
for i in range(0,len(A)):
    if A[i] == 'A':
        print i+1
0