結果

問題 No.26 シャッフルゲーム
ユーザー kohei2019
提出日時 2021-02-10 13:12:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 5,000 ms
コード長 198 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 52,864 KB
最終ジャッジ日時 2024-07-07 23:49:46
合計ジャッジ時間 1,096 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
M = int(input())
lsPQ = [map(int,input().split()) for i in range(M)]
ls = ['x']*4
ls[N] = 'o'
for i in range(M):
    p,q = lsPQ[i]
    ls[p],ls[q] = ls[q],ls[p]
print(ls.index('o'))
0