結果

問題 No.26 シャッフルゲーム
ユーザー jamad
提出日時 2017-06-17 18:28:16
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 25 ms / 5,000 ms
コード長 151 bytes
コンパイル時間 197 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-01 11:27:42
合計ジャッジ時間 1,115 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

A=[0]*3
N,M=map(int,(input(),input()))
A[N-1]=1
for _ in '1'*M:
    P,Q=[int(x)-1 for x in input().split()]
    A[P],A[Q]=A[Q],A[P]
print(A.index(1)+1)
0