結果
| 問題 |
No.268 ラッピング(Easy)
|
| コンテスト | |
| ユーザー |
No
|
| 提出日時 | 2015-11-04 17:10:02 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 5,000 ms |
| コード長 | 861 bytes |
| コンパイル時間 | 915 ms |
| コンパイル使用メモリ | 115,716 KB |
| 実行使用メモリ | 26,228 KB |
| 最終ジャッジ日時 | 2024-09-13 12:24:58 |
| 合計ジャッジ時間 | 1,943 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
コンパイルメッセージ
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 ForYukicoder
{
class Program
{
static void Main(string[] args)
{
string[] a = Console.ReadLine().Split();
int w = int.Parse(a[0]);
int h = int.Parse(a[1]);
int d = int.Parse(a[2]);
int[] box = { (h + d) * 2, (w + h) * 2, (w + d) * 2 };
var C = ConvertStringArrayToIntArray(Console.ReadLine().Split());
Array.Sort(box);
Array.Sort(C);
int sum = box[2] * C[0] + box[1] * C[1] + box[0] * C[2];
Console.WriteLine(sum);
}
static int[] ConvertStringArrayToIntArray(string[] array)
{
return Array.ConvertAll(array, str => int.Parse(str));
}
}
}
No