結果

問題 No.26 シャッフルゲーム
ユーザー swdamdrswdamdr
提出日時 2017-01-25 13:15:54
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 535 bytes
コンパイル時間 2,153 ms
コンパイル使用メモリ 104,264 KB
実行使用メモリ 23,824 KB
最終ジャッジ日時 2023-08-24 22:08:31
合計ジャッジ時間 3,425 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
21,728 KB
testcase_01 AC 62 ms
23,716 KB
testcase_02 AC 62 ms
23,668 KB
testcase_03 WA -
testcase_04 AC 61 ms
21,696 KB
testcase_05 WA -
testcase_06 AC 62 ms
23,732 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 62 ms
21,828 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static void Main(string[] args)
    {
        int ans = int.Parse(Console.ReadLine());
        long n = long.Parse(Console.ReadLine());

        for (long i = 0; i < n; i++)
        {
            int[] change = Console.ReadLine().Split().Select(a => int.Parse(a)).ToArray();

            if (ans == change[0])
            {
                ans = change[1];
            }
        }

        Console.WriteLine(ans);
        Console.Read();
    }
}

0