結果

問題 No.26 シャッフルゲーム
ユーザー a_ten
提出日時 2016-03-24 15:15:55
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 158 bytes
コンパイル時間 50 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-02 00:09:56
合計ジャッジ時間 727 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding:utf-8

N=input()
M=input()
ope=[raw_input().split() for i in range(M)]

for p,q in ope:
	if int(p)==N:
		N=int(q)
	elif int(q)==N:
		N=int(p)

print N
0