結果

問題 No.26 シャッフルゲーム
ユーザー pypypymipypypymi
提出日時 2022-02-17 18:29:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 5,000 ms
コード長 208 bytes
コンパイル時間 313 ms
コンパイル使用メモリ 86,720 KB
実行使用メモリ 71,264 KB
最終ジャッジ日時 2023-09-11 17:48:01
合計ジャッジ時間 2,021 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,216 KB
testcase_01 AC 73 ms
71,068 KB
testcase_02 AC 74 ms
71,004 KB
testcase_03 AC 73 ms
71,264 KB
testcase_04 AC 73 ms
71,136 KB
testcase_05 AC 74 ms
71,024 KB
testcase_06 AC 75 ms
71,264 KB
testcase_07 AC 75 ms
70,912 KB
testcase_08 AC 82 ms
71,052 KB
testcase_09 AC 81 ms
71,164 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
m = int(input())
array = [list(map(int,input().split())) for i in range(m)]
before = n
for i,j in array:
    if i==before:
        before=j
    elif j==before:
        before=i
print(before)
0