結果

問題 No.920 あかあお
ユーザー workaholismworkaholism
提出日時 2019-11-13 10:45:36
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 530 bytes
コンパイル時間 739 ms
コンパイル使用メモリ 106,092 KB
実行使用メモリ 24,084 KB
最終ジャッジ日時 2023-10-24 11:39:41
合計ジャッジ時間 1,703 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

using System;

internal class Program
{
    private static void Main(string[] args)
    {
        var abcArr = Console.ReadLine().Split(' ');
        var a = int.Parse(abcArr[0]);
        var b = int.Parse(abcArr[1]);
        var c = int.Parse(abcArr[2]);

        var result = Math.Min(a, b);

        var difAB = Math.Max(a, b) - result;

        if (difAB < c)
        {
            result += difAB + ((c - difAB) / 2);
        }
        else
        {
            result += c;
        }

        Console.Write(result);
    }
}
0