結果
| 問題 |
No.26 シャッフルゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-11-20 11:20:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 41 ms / 5,000 ms |
| コード長 | 254 bytes |
| コンパイル時間 | 156 ms |
| コンパイル使用メモリ | 82,108 KB |
| 実行使用メモリ | 54,364 KB |
| 最終ジャッジ日時 | 2024-09-21 12:17:27 |
| 合計ジャッジ時間 | 1,223 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
N = int(input())
cup = [False] * 3
cup[N - 1] = True
M = int(input())
for _ in range(M):
P,Q = map(int,input().split())
cup[P - 1], cup[Q - 1] = cup[Q - 1], cup[P - 1]
for i in range(3):
if cup[i]:
print(i + 1)
break