結果

問題 No.1808 Fullgold Alchemist
ユーザー tentententen
提出日時 2022-09-28 09:44:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 263 ms / 2,000 ms
コード長 1,185 bytes
コンパイル時間 2,157 ms
コンパイル使用メモリ 73,784 KB
実行使用メモリ 63,032 KB
最終ジャッジ日時 2023-08-24 04:17:30
合計ジャッジ時間 9,399 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
49,376 KB
testcase_01 AC 41 ms
49,312 KB
testcase_02 AC 41 ms
49,320 KB
testcase_03 AC 41 ms
49,248 KB
testcase_04 AC 42 ms
49,488 KB
testcase_05 AC 205 ms
56,060 KB
testcase_06 AC 239 ms
57,524 KB
testcase_07 AC 234 ms
58,024 KB
testcase_08 AC 260 ms
62,908 KB
testcase_09 AC 263 ms
63,032 KB
testcase_10 AC 254 ms
62,792 KB
testcase_11 AC 251 ms
60,164 KB
testcase_12 AC 244 ms
57,968 KB
testcase_13 AC 243 ms
57,564 KB
testcase_14 AC 240 ms
57,420 KB
testcase_15 AC 226 ms
57,880 KB
testcase_16 AC 82 ms
52,404 KB
testcase_17 AC 41 ms
49,484 KB
testcase_18 AC 135 ms
54,500 KB
testcase_19 AC 74 ms
50,480 KB
testcase_20 AC 135 ms
55,788 KB
testcase_21 AC 97 ms
52,580 KB
testcase_22 AC 41 ms
49,560 KB
testcase_23 AC 105 ms
52,620 KB
testcase_24 AC 84 ms
52,100 KB
testcase_25 AC 86 ms
50,524 KB
testcase_26 AC 128 ms
55,332 KB
testcase_27 AC 158 ms
55,392 KB
testcase_28 AC 252 ms
58,900 KB
testcase_29 AC 181 ms
55,584 KB
testcase_30 AC 156 ms
54,504 KB
testcase_31 AC 232 ms
57,528 KB
testcase_32 AC 212 ms
55,240 KB
testcase_33 AC 228 ms
57,896 KB
testcase_34 AC 251 ms
58,624 KB
testcase_35 AC 218 ms
58,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner();
        int n = sc.nextInt();
        int m = sc.nextInt();
        long ans = Long.MAX_VALUE;
        long sum = 0;
        for (int i = 1; i <= n; i++) {
            sum += sc.nextInt();
            ans = Math.min(ans, sum / i / m);
        }
        System.out.println(ans);
    }
}
    
class Scanner {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");
    StringBuilder sb = new StringBuilder();
    
    public Scanner() throws Exception {
        
    }
    
    public int nextInt() throws Exception {
        return Integer.parseInt(next());
    }
    
    public long nextLong() throws Exception {
        return Long.parseLong(next());
    }
    
    public double nextDouble() throws Exception {
        return Double.parseDouble(next());
    }
    
    public String next() throws Exception {
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
    
}
0