結果

問題 No.73 helloworld
ユーザー tsunabittsunabit
提出日時 2020-01-07 15:02:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 774 bytes
コンパイル時間 3,286 ms
コンパイル使用メモリ 72,500 KB
実行使用メモリ 57,756 KB
最終ジャッジ日時 2023-08-14 23:21:28
合計ジャッジ時間 5,957 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,812 KB
testcase_01 AC 122 ms
56,148 KB
testcase_02 AC 122 ms
55,828 KB
testcase_03 AC 124 ms
56,312 KB
testcase_04 AC 120 ms
55,676 KB
testcase_05 AC 121 ms
57,756 KB
testcase_06 AC 121 ms
55,916 KB
testcase_07 AC 123 ms
55,564 KB
testcase_08 AC 121 ms
55,820 KB
testcase_09 AC 122 ms
56,076 KB
testcase_10 AC 122 ms
55,656 KB
testcase_11 AC 124 ms
56,004 KB
testcase_12 AC 122 ms
55,656 KB
testcase_13 AC 121 ms
55,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class No73 {
//	private static Set<String> set = new HashSet<String>();
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] a = new int[26];
		long total = 0;
		for(int i = 0; i < 26; i++) {
			a[i] = sc.nextInt();
		}
		// この問題は部分文字列
		// lとo以外の文字
		total = (long)a[3]*a[4]*a[7]*a[17]*a[22];
		// lの最大
		long maxl = 0;
		for(int i = 2; i < a[11]; i++) {
			long tmp = i * (i - 1) / 2 * (a[11] - i);
			maxl = Math.max(maxl, tmp);
		}
		// oの最大
		long maxo = 0;
		for(int i = 1; i < a[14]; i++) {
			long tmp = i * (a[14] - i);
			maxo = Math.max(maxo, tmp);
		}
		total = total * maxl * maxo;
		System.out.println(total);
	}
}
0