結果
問題 | No.73 helloworld |
ユーザー | tsunabit |
提出日時 | 2020-01-07 15:02:59 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 137 ms / 5,000 ms |
コード長 | 774 bytes |
コンパイル時間 | 3,589 ms |
コンパイル使用メモリ | 79,552 KB |
実行使用メモリ | 41,428 KB |
最終ジャッジ日時 | 2024-11-23 01:00:03 |
合計ジャッジ時間 | 5,981 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
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); } }