結果

問題 No.851 テストケース
ユーザー preciousydmpreciousydm
提出日時 2019-08-05 11:25:35
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,216 bytes
コンパイル時間 979 ms
コンパイル使用メモリ 65,228 KB
実行使用メモリ 22,812 KB
最終ジャッジ日時 2023-09-25 17:08:26
合計ジャッジ時間 3,217 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,704 KB
testcase_01 AC 57 ms
18,648 KB
testcase_02 AC 55 ms
20,684 KB
testcase_03 AC 57 ms
20,900 KB
testcase_04 AC 56 ms
20,716 KB
testcase_05 AC 56 ms
20,772 KB
testcase_06 AC 57 ms
20,708 KB
testcase_07 AC 57 ms
20,712 KB
testcase_08 AC 57 ms
22,812 KB
testcase_09 AC 57 ms
20,684 KB
testcase_10 AC 57 ms
22,776 KB
testcase_11 AC 57 ms
20,792 KB
testcase_12 AC 56 ms
20,732 KB
testcase_13 AC 57 ms
20,788 KB
testcase_14 AC 57 ms
20,772 KB
testcase_15 AC 57 ms
20,684 KB
testcase_16 AC 57 ms
20,804 KB
testcase_17 AC 57 ms
22,680 KB
testcase_18 AC 56 ms
20,772 KB
testcase_19 AC 54 ms
20,664 KB
testcase_20 AC 54 ms
20,656 KB
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace yukicoder
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());

            int a = 0;
            int b = 0;
            int c = 0;

            List<int> li = new List<int>();
            List<int> ali = new List<int>();

            try
            {
                for(int i = 0;i < N; i++)
                {
                    li.Add(int.Parse(Console.ReadLine()));
                }
                a = li[0] + li[1];
                b = li[1] + li[2];
                c = li[2] + li[0];

                li[0] = a;
                li[1] = b;
                li[2] = c;

                li.Sort((d, e) => e - d);

                foreach (int i in li)
                {
                    if (!ali.Contains(i))
                    {
                        ali.Add(i);
                    }
                }

                Console.Write(ali[1]);

            }
            catch
            {
                Console.Write("\"assert\"");
            }

            Console.ReadLine();
        }
    }
}
0