結果
| 問題 |
No.851 テストケース
|
| コンテスト | |
| ユーザー |
Atria
|
| 提出日時 | 2019-11-13 11:27:37 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 3,153 ms |
| コード長 | 1,164 bytes |
| コンパイル時間 | 782 ms |
| コンパイル使用メモリ | 104,192 KB |
| 実行使用メモリ | 17,920 KB |
| 最終ジャッジ日時 | 2024-09-21 21:06:00 |
| 合計ジャッジ時間 | 2,061 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
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[1]);
}
else if (hoge[1] == hoge[2])
{
WriteLine(hoge[0]);
}
else
{
WriteLine(hoge[1]);
}
}
catch (Exception)
{
WriteLine('"' + "assert" + '"');
}
}
}
}
Atria