結果

問題 No.920 あかあお
ユーザー curryudon08curryudon08
提出日時 2020-06-09 14:59:53
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 586 bytes
コンパイル時間 3,249 ms
コンパイル使用メモリ 103,124 KB
実行使用メモリ 22,840 KB
最終ジャッジ日時 2023-08-30 13:20:02
合計ジャッジ時間 4,993 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
22,836 KB
testcase_01 AC 57 ms
20,656 KB
testcase_02 AC 57 ms
20,728 KB
testcase_03 AC 56 ms
22,700 KB
testcase_04 AC 57 ms
20,748 KB
testcase_05 AC 57 ms
20,756 KB
testcase_06 AC 58 ms
20,752 KB
testcase_07 AC 58 ms
22,840 KB
testcase_08 AC 56 ms
18,736 KB
testcase_09 AC 57 ms
22,700 KB
testcase_10 AC 57 ms
20,788 KB
testcase_11 AC 56 ms
20,736 KB
testcase_12 AC 56 ms
20,700 KB
testcase_13 AC 56 ms
20,684 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace _0920
{
    class Program
    {
        static void Main(string[] args)
        {
            var _ = Console.ReadLine().Split();
            var x = int.Parse(_[0]);
            var y = int.Parse(_[1]);
            var z = int.Parse(_[2]);

            var diff = x >= y ? x - y : y - x;

            if(z >= diff){
                var count = ((z - diff) / 2) + Math.Max(x,y);
                Console.WriteLine(count);
            }else{
                var count = z + Math.Min(x,y);
                Console.WriteLine(count);
            }
        }
    }
}
0