結果

問題 No.26 シャッフルゲーム
ユーザー Co-3
提出日時 2020-09-20 01:50:04
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 36 ms / 5,000 ms
コード長 156 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-24 00:21:10
合計ジャッジ時間 1,257 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
m = int(input())
for i in range(m):
    p,q = map(int,input().split())
    if p == n:
        n = q
    elif q == n:
        n = p
print(n)
0