結果

問題 No.26 シャッフルゲーム
ユーザー zimphazimpha
提出日時 2017-12-09 22:04:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 5,000 ms
コード長 201 bytes
コンパイル時間 1,555 ms
コンパイル使用メモリ 86,532 KB
実行使用メモリ 71,068 KB
最終ジャッジ日時 2023-08-20 05:20:38
合計ジャッジ時間 1,752 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
70,960 KB
testcase_01 AC 71 ms
71,032 KB
testcase_02 AC 73 ms
70,672 KB
testcase_03 AC 72 ms
71,044 KB
testcase_04 AC 72 ms
70,668 KB
testcase_05 AC 73 ms
71,068 KB
testcase_06 AC 73 ms
71,040 KB
testcase_07 AC 74 ms
71,068 KB
testcase_08 AC 74 ms
70,988 KB
testcase_09 AC 73 ms
71,044 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
p = [1, 2, 3]
m = int(input())
for i in range(m):
  x, y = list(map(int, input().split()))
  p[x - 1], p[y - 1] = p[y - 1], p[x - 1]
for i in range(3):
  if p[i] == n:
    print(i + 1)
0