結果
問題 |
No.851 テストケース
|
ユーザー |
![]() |
提出日時 | 2021-05-20 18:35:56 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 725 bytes |
コンパイル時間 | 799 ms |
コンパイル使用メモリ | 103,936 KB |
実行使用メモリ | 18,176 KB |
最終ジャッジ日時 | 2024-10-10 07:17:47 |
合計ジャッジ時間 | 2,117 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 RE * 2 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System.Collections.Generic; using System; public class Hello { static void Main() { Console.ReadLine(); var a = new int[3]; var ok = true; for (int i = 0; i < 3; i++) { string[] line = Console.ReadLine().Trim().Split(' '); if (line.Length > 1) { Console.WriteLine(@"""assert"""); ok = false; break; } a[i] = int.Parse(line[0]); } if (ok) { var b = new List<int>(); b.Add(a[0] + a[1]); b.Add(a[1] + a[2]); b.Add(a[2] + a[0]); b.Sort(); if (b[1] == b[2]) Console.WriteLine(b[0]); else Console.WriteLine(b[1]); } } }