結果
| 問題 |
No.570 3人兄弟(その1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-15 12:04:02 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 2,000 ms |
| コード長 | 591 bytes |
| コンパイル時間 | 3,998 ms |
| コンパイル使用メモリ | 114,276 KB |
| 実行使用メモリ | 27,232 KB |
| 最終ジャッジ日時 | 2024-11-17 17:40:27 |
| 合計ジャッジ時間 | 1,442 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 |
コンパイルメッセージ
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.Text.RegularExpressions;
class Program
{
static void Main(string[] args)
{
var bro = new Brother[3];
for (int i = 0; i < 3; i++)
{
bro[i] = new Brother
{
Height = int.Parse(Console.ReadLine()),
Name = (char)('A' + i)
};
}
var ordered = bro.OrderByDescending(i => i.Height).Select(i => i.Name);
foreach (var item in ordered)
{
Console.WriteLine(item);
}
}
public class Brother
{
public int Height { get; set; }
public char Name { get; set; }
}
}