結果
問題 |
No.851 テストケース
|
ユーザー |
![]() |
提出日時 | 2019-08-05 11:25:35 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,216 bytes |
コンパイル時間 | 761 ms |
コンパイル使用メモリ | 114,764 KB |
実行使用メモリ | 25,760 KB |
最終ジャッジ日時 | 2024-07-18 13:27:09 |
合計ジャッジ時間 | 1,852 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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.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(); } } }