結果
| 問題 |
No.851 テストケース
|
| コンテスト | |
| ユーザー |
preciousydm
|
| 提出日時 | 2019-08-05 11:24:13 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,212 bytes |
| コンパイル時間 | 788 ms |
| コンパイル使用メモリ | 105,472 KB |
| 実行使用メモリ | 17,920 KB |
| 最終ジャッジ日時 | 2024-07-18 13:27:07 |
| 合計ジャッジ時間 | 1,961 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 16 WA * 4 |
コンパイルメッセージ
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();
}
}
}
preciousydm