結果

問題 No.26 シャッフルゲーム
ユーザー pirorirori_n712
提出日時 2018-07-28 12:33:05
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 20 ms / 5,000 ms
コード長 305 bytes
コンパイル時間 651 ms
コンパイル使用メモリ 102,656 KB
実行使用メモリ 17,920 KB
最終ジャッジ日時 2024-07-05 18:22:10
合計ジャッジ時間 1,296 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class No26{
    static void Main(){
        var a=Console.ReadLine();
        var b=Int32.Parse(Console.ReadLine());
        for(int i=0;i<b;++i){
            var c=Console.ReadLine().Split(' ');
            a=(c[0]==a)?c[1]:(c[1]==a)?c[0]:a;
        }
        Console.WriteLine(a);
    }
}
0