結果

問題 No.73 helloworld
ユーザー GrenacheGrenache
提出日時 2015-11-03 21:41:45
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 674 bytes
コンパイル時間 4,412 ms
コンパイル使用メモリ 72,476 KB
実行使用メモリ 56,596 KB
最終ジャッジ日時 2023-10-11 13:35:58
合計ジャッジ時間 6,708 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,872 KB
testcase_01 AC 125 ms
56,056 KB
testcase_02 AC 126 ms
55,924 KB
testcase_03 AC 126 ms
55,900 KB
testcase_04 AC 126 ms
55,704 KB
testcase_05 AC 127 ms
56,104 KB
testcase_06 AC 127 ms
56,596 KB
testcase_07 AC 129 ms
55,936 KB
testcase_08 AC 126 ms
55,884 KB
testcase_09 AC 127 ms
55,760 KB
testcase_10 AC 127 ms
56,132 KB
testcase_11 WA -
testcase_12 AC 126 ms
55,868 KB
testcase_13 AC 126 ms
55,972 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder73 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int[] c = new int[26];
        for (int i = 0; i < 26; i++) {
        	c[i] = sc.nextInt();
        }

        long ret = c['h' - 'a'] * c['e' - 'a'] * c['w' - 'a'] * c['r' - 'a'] * c['d' - 'a'];
        long tmp = c['o' - 'a'] / 2;
        ret *= (c['o' - 'a'] - tmp) * tmp;

        long max = 0;
        for (long l = 1; l <= c['l' - 'a']; l++) {
        	max = Math.max(max, ret * (c['l' - 'a'] - l) * (c['l' - 'a'] - l - 1) / 2 * l);
        }

		System.out.println(max);
        
        sc.close();
    }
}
0