結果

問題 No.26 シャッフルゲーム
ユーザー ktshunktshun
提出日時 2015-06-01 14:33:53
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 189 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 6,680 KB
実行使用メモリ 6,160 KB
最終ジャッジ日時 2023-09-20 18:19:01
合計ジャッジ時間 826 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,072 KB
testcase_01 AC 11 ms
6,056 KB
testcase_02 AC 12 ms
6,068 KB
testcase_03 WA -
testcase_04 AC 12 ms
5,944 KB
testcase_05 WA -
testcase_06 AC 12 ms
5,972 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 12 ms
6,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding:utf-8 -*-

if __name__ == "__main__":
	n = input()
	m = input()
	for i in xrange(m):
		p,q = map(int,raw_input().split())
		if p == n:
			n = q
		elif q == n:
			n = q
	print n
0