結果

問題 No.5 数字のブロック
ユーザー takosama312takosama312
提出日時 2016-01-31 16:45:25
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 90 ms / 5,000 ms
コード長 541 bytes
コンパイル時間 4,351 ms
コンパイル使用メモリ 104,084 KB
実行使用メモリ 24,464 KB
最終ジャッジ日時 2023-08-11 14:35:39
合計ジャッジ時間 7,765 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
21,824 KB
testcase_01 AC 65 ms
21,712 KB
testcase_02 AC 65 ms
21,692 KB
testcase_03 AC 78 ms
20,160 KB
testcase_04 AC 76 ms
22,228 KB
testcase_05 AC 79 ms
24,388 KB
testcase_06 AC 76 ms
22,188 KB
testcase_07 AC 75 ms
22,180 KB
testcase_08 AC 77 ms
22,216 KB
testcase_09 AC 74 ms
20,024 KB
testcase_10 AC 78 ms
22,400 KB
testcase_11 AC 75 ms
20,080 KB
testcase_12 AC 77 ms
24,284 KB
testcase_13 AC 77 ms
22,260 KB
testcase_14 AC 66 ms
21,652 KB
testcase_15 AC 73 ms
23,884 KB
testcase_16 AC 80 ms
22,200 KB
testcase_17 AC 79 ms
22,484 KB
testcase_18 AC 79 ms
22,424 KB
testcase_19 AC 82 ms
24,464 KB
testcase_20 AC 69 ms
21,660 KB
testcase_21 AC 70 ms
23,772 KB
testcase_22 AC 71 ms
21,760 KB
testcase_23 AC 70 ms
21,720 KB
testcase_24 AC 80 ms
23,980 KB
testcase_25 AC 84 ms
23,924 KB
testcase_26 AC 72 ms
21,808 KB
testcase_27 AC 74 ms
23,744 KB
testcase_28 AC 72 ms
23,748 KB
testcase_29 AC 90 ms
24,172 KB
testcase_30 AC 82 ms
22,052 KB
testcase_31 AC 70 ms
21,620 KB
testcase_32 AC 71 ms
23,728 KB
testcase_33 AC 72 ms
21,768 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

namespace No._5_数字のブロック
{
    class Program
    {
        static void Main(string[] args)
        {
            var numList = new List<int>() { int.Parse(Console.ReadLine()) }; Console.ReadLine();
            var line = Console.ReadLine().Split(' ').Select(int.Parse).OrderBy(_ => _).ToList();
            line.Aggregate((a, b) => { if (a + b <= numList[0]) numList.Add(a + b); return a + b; });
            Console.WriteLine(numList.Count);
        }
    }
}
0