結果

問題 No.149 碁石の移動
ユーザー しらゆきしらゆき
提出日時 2015-11-20 09:35:41
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 738 bytes
コンパイル時間 2,071 ms
コンパイル使用メモリ 101,728 KB
実行使用メモリ 23,844 KB
最終ジャッジ日時 2023-10-11 18:08:31
合計ジャッジ時間 4,388 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
21,836 KB
testcase_01 AC 61 ms
21,796 KB
testcase_02 AC 62 ms
21,884 KB
testcase_03 AC 61 ms
21,824 KB
testcase_04 AC 61 ms
21,812 KB
testcase_05 AC 62 ms
23,844 KB
testcase_06 AC 61 ms
21,836 KB
testcase_07 AC 61 ms
19,776 KB
testcase_08 AC 62 ms
21,836 KB
testcase_09 AC 62 ms
23,804 KB
testcase_10 AC 61 ms
21,836 KB
testcase_11 WA -
testcase_12 AC 61 ms
23,748 KB
testcase_13 AC 62 ms
21,828 KB
testcase_14 WA -
testcase_15 AC 62 ms
21,988 KB
testcase_16 AC 61 ms
21,988 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;

class Program
{
    static void Main()
    {
        int[] i = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int[] j = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int[] k = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int aw = i[0];
        int ab = i[1];
        int bw = j[0];
        int bb = j[1];
        int c = k[0];
        int d = k[1];

        if (c > ab)
        {
            aw -= c - ab;
            ab = 0;
            bw = c - ab;
            bb += ab;
        }
        else
        {
            ab -= c;
            bb += c;
        }

        if (bw > d) aw += d;
        else aw += bw;

        Console.WriteLine(aw);
    }
}
0