結果

問題 No.26 シャッフルゲーム
ユーザー tarotaro789
提出日時 2017-10-22 14:46:08
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 5,000 ms
コード長 231 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-11-21 13:47:15
合計ジャッジ時間 893 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

fs=int(input())

ls=['x']*3
ls[fs-1]='o'

n=int(input())
for i in range(n):
    chls=list(map(int,input().split()))

    sh=[chls[0]-1,chls[1]-1]

    buf=ls[sh[0]]
    ls[sh[0]]=ls[sh[1]]
    ls[sh[1]]=buf

print(ls.index('o')+1)
0