結果
| 問題 |
No.26 シャッフルゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-01-25 13:15:54 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 535 bytes |
| コンパイル時間 | 1,047 ms |
| コンパイル使用メモリ | 105,984 KB |
| 実行使用メモリ | 19,072 KB |
| 最終ジャッジ日時 | 2024-12-23 08:23:00 |
| 合計ジャッジ時間 | 1,540 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 4 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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();
}
}