結果
| 問題 | 
                            No.851 テストケース
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Atria
                         | 
                    
| 提出日時 | 2019-11-13 11:22:11 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,164 bytes | 
| コンパイル時間 | 805 ms | 
| コンパイル使用メモリ | 109,092 KB | 
| 実行使用メモリ | 25,768 KB | 
| 最終ジャッジ日時 | 2024-09-21 21:05:57 | 
| 合計ジャッジ時間 | 2,247 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 18 WA * 2 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using static System.Console;
using static System.Math;
namespace CP
{
    class Atria
    {
        static void Main(string[] args)
        {
            int n = int.Parse(ReadLine());
            try
            {
                var ls = new List<long>();
                for (int i = 0; i < n; i++)
                {
                    ls.Add(long.Parse(ReadLine()));
                }
                var hoge = new List<long>();
                hoge.Add(ls[0] + ls[1]);
                hoge.Add(ls[2] + ls[1]);
                hoge.Add(ls[0] + ls[2]);
                hoge.Sort();
                if (hoge[0] == hoge[1])
                {
                    WriteLine(hoge[2]);
                }
                else if (hoge[1] == hoge[2])
                {
                    WriteLine(hoge[0]);
                }
                else
                {
                    WriteLine(hoge[1]);
                }
            }
            catch (Exception)
            {
                WriteLine('"' + "assert" + '"');
            }
        }
    }
}
            
            
            
        
            
Atria