結果

問題 No.26 シャッフルゲーム
ユーザー 👑 colognecologne
提出日時 2022-01-23 14:07:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 5,000 ms
コード長 264 bytes
コンパイル時間 343 ms
コンパイル使用メモリ 86,804 KB
実行使用メモリ 71,388 KB
最終ジャッジ日時 2023-08-19 18:55:42
合計ジャッジ時間 2,082 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,140 KB
testcase_01 AC 68 ms
71,124 KB
testcase_02 AC 71 ms
71,336 KB
testcase_03 AC 70 ms
71,204 KB
testcase_04 AC 70 ms
70,968 KB
testcase_05 AC 68 ms
71,228 KB
testcase_06 AC 68 ms
71,388 KB
testcase_07 AC 70 ms
71,340 KB
testcase_08 AC 70 ms
71,204 KB
testcase_09 AC 71 ms
71,244 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

input = sys.stdin.readline


def main():
    N = int(input())
    M = int(input())
    for i in range(M):
        a, b = map(int, input().split())
        if a == N or b == N:
            N = a+b-N

    print(N)


if __name__ == '__main__':
    main()
0