結果

問題 No.26 シャッフルゲーム
ユーザー tarotaro789tarotaro789
提出日時 2017-10-22 14:46:08
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 231 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 7,928 KB
最終ジャッジ日時 2023-08-13 17:35:29
合計ジャッジ時間 925 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,848 KB
testcase_01 AC 15 ms
7,748 KB
testcase_02 AC 16 ms
7,780 KB
testcase_03 AC 16 ms
7,876 KB
testcase_04 AC 16 ms
7,784 KB
testcase_05 AC 16 ms
7,928 KB
testcase_06 AC 16 ms
7,820 KB
testcase_07 AC 15 ms
7,764 KB
testcase_08 AC 16 ms
7,824 KB
testcase_09 AC 16 ms
7,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

fs=int(input())

ls=['x']*3
ls[fs-1]='o'

n=int(input())
for i in range(n):
    chls=list(map(int,input().split()))

    sh=[chls[0]-1,chls[1]-1]

    buf=ls[sh[0]]
    ls[sh[0]]=ls[sh[1]]
    ls[sh[1]]=buf

print(ls.index('o')+1)
0