結果
| 問題 |
No.26 シャッフルゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-03 23:44:37 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 5,000 ms |
| コード長 | 167 bytes |
| コンパイル時間 | 189 ms |
| コンパイル使用メモリ | 82,164 KB |
| 実行使用メモリ | 52,864 KB |
| 最終ジャッジ日時 | 2024-11-21 22:34:37 |
| 合計ジャッジ時間 | 1,308 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
N = int(input())
M = int(input())
PQ = [list(map(int, input().split())) for _ in range(M)]
for p, q in PQ:
if N==p:
N=q
elif N==q:
N=p
print(N)