結果

問題 No.5 数字のブロック
ユーザー j1930021j1930021
提出日時 2016-01-08 20:49:10
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 80 ms / 5,000 ms
コード長 541 bytes
コンパイル時間 2,754 ms
コンパイル使用メモリ 106,264 KB
実行使用メモリ 24,528 KB
最終ジャッジ日時 2023-08-11 14:29:50
合計ジャッジ時間 6,688 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
23,708 KB
testcase_01 AC 65 ms
23,824 KB
testcase_02 AC 64 ms
21,676 KB
testcase_03 AC 77 ms
24,276 KB
testcase_04 AC 76 ms
24,160 KB
testcase_05 AC 79 ms
22,208 KB
testcase_06 AC 75 ms
20,292 KB
testcase_07 AC 75 ms
22,228 KB
testcase_08 AC 76 ms
22,228 KB
testcase_09 AC 73 ms
22,100 KB
testcase_10 AC 79 ms
24,388 KB
testcase_11 AC 76 ms
22,096 KB
testcase_12 AC 77 ms
24,264 KB
testcase_13 AC 78 ms
22,312 KB
testcase_14 AC 66 ms
21,720 KB
testcase_15 AC 72 ms
21,880 KB
testcase_16 AC 78 ms
22,324 KB
testcase_17 AC 78 ms
22,496 KB
testcase_18 AC 79 ms
20,340 KB
testcase_19 AC 80 ms
24,528 KB
testcase_20 AC 65 ms
23,744 KB
testcase_21 AC 63 ms
21,692 KB
testcase_22 AC 64 ms
21,724 KB
testcase_23 AC 65 ms
21,776 KB
testcase_24 AC 73 ms
21,964 KB
testcase_25 AC 73 ms
23,952 KB
testcase_26 AC 65 ms
21,624 KB
testcase_27 AC 65 ms
21,708 KB
testcase_28 AC 64 ms
21,732 KB
testcase_29 AC 76 ms
24,180 KB
testcase_30 AC 73 ms
20,000 KB
testcase_31 AC 63 ms
21,668 KB
testcase_32 AC 62 ms
21,756 KB
testcase_33 AC 62 ms
19,740 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