結果
問題 | No.73 helloworld |
ユーザー | YamaKasa |
提出日時 | 2018-07-01 00:47:59 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 125 ms / 5,000 ms |
コード長 | 646 bytes |
コンパイル時間 | 1,869 ms |
コンパイル使用メモリ | 73,072 KB |
実行使用メモリ | 56,532 KB |
最終ジャッジ日時 | 2023-09-13 16:26:53 |
合計ジャッジ時間 | 4,419 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 123 ms
55,764 KB |
testcase_01 | AC | 124 ms
56,532 KB |
testcase_02 | AC | 124 ms
56,196 KB |
testcase_03 | AC | 123 ms
55,996 KB |
testcase_04 | AC | 124 ms
55,856 KB |
testcase_05 | AC | 123 ms
56,012 KB |
testcase_06 | AC | 122 ms
55,920 KB |
testcase_07 | AC | 124 ms
55,716 KB |
testcase_08 | AC | 123 ms
55,972 KB |
testcase_09 | AC | 124 ms
55,756 KB |
testcase_10 | AC | 123 ms
55,716 KB |
testcase_11 | AC | 125 ms
55,876 KB |
testcase_12 | AC | 123 ms
55,708 KB |
testcase_13 | AC | 124 ms
56,240 KB |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[] C = new int[26]; for(int i = 0; i < 26; i++) { C[i] = scan.nextInt(); } scan.close(); // d e h l o r w // 3 4 7 11 14 17 22 long ans = (long)C[3] * C[4] * C[7] * C[17] * C[22]; long max1 = 0; for(int i = 2; i < C[11]; i++) { long t = (i * (i - 1))*(C[11] - i) / 2; max1 = Math.max(max1, t); } long max2 = 0; for(int i = 1; i < C[14]; i++) { long t = i * (C[14] - i); max2 = Math.max(max2, t); } ans = ans * max1 * max2; System.out.println(ans); } }