結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
23,660 KB
testcase_01 AC 59 ms
21,628 KB
testcase_02 AC 60 ms
21,564 KB
testcase_03 WA -
testcase_04 AC 60 ms
21,784 KB
testcase_05 WA -
testcase_06 AC 59 ms
21,640 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 59 ms
23,636 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());
        int n = int.Parse(Console.ReadLine());

        for (int 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