結果

問題 No.1808 Fullgold Alchemist
ユーザー bluemeganebluemegane
提出日時 2022-01-15 16:05:27
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 670 bytes
コンパイル時間 882 ms
コンパイル使用メモリ 65,500 KB
実行使用メモリ 48,080 KB
最終ジャッジ日時 2023-08-13 23:43:12
合計ジャッジ時間 7,039 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
22,840 KB
testcase_01 AC 47 ms
18,648 KB
testcase_02 AC 49 ms
22,680 KB
testcase_03 AC 48 ms
22,740 KB
testcase_04 AC 47 ms
20,772 KB
testcase_05 AC 95 ms
34,452 KB
testcase_06 AC 110 ms
39,992 KB
testcase_07 AC 110 ms
35,764 KB
testcase_08 AC 128 ms
46,020 KB
testcase_09 AC 127 ms
48,080 KB
testcase_10 AC 128 ms
48,020 KB
testcase_11 AC 117 ms
40,648 KB
testcase_12 AC 112 ms
37,364 KB
testcase_13 AC 112 ms
39,472 KB
testcase_14 AC 113 ms
39,456 KB
testcase_15 AC 114 ms
39,476 KB
testcase_16 AC 55 ms
21,208 KB
testcase_17 AC 47 ms
20,824 KB
testcase_18 AC 63 ms
21,704 KB
testcase_19 AC 56 ms
20,908 KB
testcase_20 AC 66 ms
22,540 KB
testcase_21 AC 59 ms
21,784 KB
testcase_22 AC 49 ms
20,740 KB
testcase_23 AC 56 ms
21,344 KB
testcase_24 AC 55 ms
21,128 KB
testcase_25 AC 56 ms
21,196 KB
testcase_26 AC 63 ms
24,196 KB
testcase_27 AC 64 ms
22,860 KB
testcase_28 AC 113 ms
37,420 KB
testcase_29 AC 72 ms
25,988 KB
testcase_30 AC 72 ms
27,732 KB
testcase_31 AC 111 ms
40,332 KB
testcase_32 AC 84 ms
28,348 KB
testcase_33 AC 100 ms
38,960 KB
testcase_34 AC 114 ms
39,248 KB
testcase_35 AC 97 ms
35,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using static System.Math;
using System;

public class Hello
{
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var n = int.Parse(line[0]);
        var m = int.Parse(line[1]);
        line = Console.ReadLine().Trim().Split(' ');
        var a = Array.ConvertAll(line, int.Parse);
        getAns(n, m, a);
    }
    static void getAns(int n, int m, int[] a)
    {
        long pre = a[0];
        long ans = pre;
        var p = 2;
        for (int i = 1; i < n; i++)
        {
            var t = pre + a[i];
            ans = Min(ans, t / p++);
            pre = t;
        }
        Console.WriteLine(ans / m);
    }
}
0