結果

問題 No.73 helloworld
ユーザー kou6839kou6839
提出日時 2014-12-02 20:07:17
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,316 bytes
コンパイル時間 1,961 ms
コンパイル使用メモリ 73,980 KB
実行使用メモリ 58,672 KB
最終ジャッジ日時 2023-09-02 01:01:04
合計ジャッジ時間 4,931 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 121 ms
55,788 KB
testcase_02 AC 126 ms
56,136 KB
testcase_03 AC 122 ms
55,712 KB
testcase_04 AC 123 ms
56,448 KB
testcase_05 WA -
testcase_06 AC 126 ms
55,748 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 124 ms
55,804 KB
testcase_13 AC 124 ms
54,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigInteger;
import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] al = new int[26];
        for(int i=0;i<26;i++){
        	al[i]=sc.nextInt();
        }
        int ans=1;
        if(al[3]<1){
        	System.out.println(0);
        	return;
        }
        ans*=al[3];
        if(al[4]<1){
        	System.out.println(0);
        	return;
        }
        ans*=al[4];
        if(al[7]<1){
        	System.out.println(0);
        	return;
        }
        ans*=al[7];
        if(al[11]<3){
        	System.out.println(0);
        	return;
        }
        int temp1=1;
        for(int i=2;i<al[11];i++){
        	temp1=Math.max(temp1, i*(i-1)/2*(al[11]-i));
        }
        ans*=temp1;
        if(al[14]<2){
        	System.out.println(0);
        	return;
        }
        int temp2=1;
        for(int i=1;i<al[14];i++){
        	temp2=Math.max(temp2, i*(al[14]-i));
        }
        ans*=temp2;
        if(al[17]<1){
        	System.out.println(0);
        	return;
        }
        ans*=al[17];
        if(al[22]<1){
        	System.out.println(0);
        	return;
        }
        ans*=al[22];
        System.out.println(ans);
    }
}
0