結果
問題 |
No.26 シャッフルゲーム
|
ユーザー |
![]() |
提出日時 | 2019-12-15 14:19:29 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 33 ms / 5,000 ms |
コード長 | 625 bytes |
コンパイル時間 | 155 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-02 18:13:56 |
合計ジャッジ時間 | 965 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
import sys import datetime sys.setrecursionlimit(10 ** 6) int1 = lambda x: int(x) - 1 p2D = lambda x: print(*x, sep="\n") def MI(): return map(int, sys.stdin.readline().split()) def MI1(): return map(int1, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] def main(): start=int(input()) m=int(input()) cup=[False]*3 cup[start-1]=True for _ in range(m): p,q=MI1() cup[p],cup[q]=cup[q],cup[p] for i in range(3): if cup[i]: print(i+1) break main()