結果

問題 No.26 シャッフルゲーム
ユーザー osrgy01
提出日時 2020-12-26 09:55:17
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 181 bytes
コンパイル時間 156 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-24 10:33:52
合計ジャッジ時間 1,075 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
ans=[0]*3
ans[n-1]=1
for _ in range(int(input())):
    c1,c2=map(int,input().split())
    if ans[c1-1]:
        ans[c1-1]-=1
        ans[c2-1]=1
print(ans.index(1)+1)
0