結果

問題 No.73 helloworld
ユーザー holegumaholeguma
提出日時 2015-08-14 10:33:01
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 780 bytes
コンパイル時間 1,993 ms
コンパイル使用メモリ 73,640 KB
実行使用メモリ 50,140 KB
最終ジャッジ日時 2023-09-25 11:33:02
合計ジャッジ時間 3,465 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 43 ms
49,640 KB
testcase_02 AC 45 ms
49,828 KB
testcase_03 AC 46 ms
49,460 KB
testcase_04 RE -
testcase_05 WA -
testcase_06 AC 44 ms
49,360 KB
testcase_07 WA -
testcase_08 RE -
testcase_09 RE -
testcase_10 WA -
testcase_11 RE -
testcase_12 AC 44 ms
49,600 KB
testcase_13 AC 44 ms
49,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;

class Main{

static final PrintWriter out=new PrintWriter(System.out);

public static void main(String[] arg) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int[] a=new int[27];
for(int i=1;i<=26;i++) a[i]=Integer.parseInt(br.readLine());
int d=a[4];
int e=a[5];
int h=a[8];
int l=a[12];
int o=a[15];
int r=a[18];
int w=a[23];
int o1=o/2;
o=o1*(o-o1);
int l1=0;
if(l>=3){
for(int i=2;i<=l-1;i++) l1=Math.max(l1,combination(i,2)*(l-i));
}
else l1=0;
out.println(d*e*h*l1*o*r*w);
out.flush();
}

private static int combination(int a,int b){
if(b==0||b==a) return 1;
if(b==a-1||b==1) return a;
return (int)(fact(a,b+1)/fact(a-b,1));
}

private static long fact(int a,int b){
if(a==b) return b;
return a*fact(a-1,b);
}
}
0