結果

問題 No.73 helloworld
ユーザー ぴろずぴろず
提出日時 2014-12-11 15:04:52
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 570 bytes
コンパイル時間 2,081 ms
コンパイル使用メモリ 71,252 KB
実行使用メモリ 57,460 KB
最終ジャッジ日時 2023-09-02 13:59:35
合計ジャッジ時間 5,125 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
55,756 KB
testcase_01 AC 128 ms
55,664 KB
testcase_02 AC 130 ms
55,824 KB
testcase_03 AC 130 ms
55,392 KB
testcase_04 AC 129 ms
55,992 KB
testcase_05 AC 126 ms
55,920 KB
testcase_06 AC 129 ms
55,840 KB
testcase_07 AC 129 ms
55,444 KB
testcase_08 AC 129 ms
55,640 KB
testcase_09 AC 129 ms
55,460 KB
testcase_10 AC 129 ms
55,720 KB
testcase_11 WA -
testcase_12 AC 126 ms
55,724 KB
testcase_13 AC 127 ms
55,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no073;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] c = new int[128];
		for(int i=0;i<26;i++) {
			c[i + 'a'] = sc.nextInt();
		}
		long num = 1;
		num *= c['h'] * c['e'] * c['w'] * c['r'] * c['d'];
		int o = c['o'];
		num *= (o/2) * (o-o/2);
		int l = c['l'];
		if (l == 0) {
			num = 0;
		}else{
			long max = 0;
			for(int i=1;i<l;i++) {
				max = Math.max(max,i*(i-1)/2*(l-i));
			}
			num *= max;
		}
		System.out.println(num);
	}

}
0