結果
問題 |
No.73 helloworld
|
ユーザー |
![]() |
提出日時 | 2014-12-02 20:07:17 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,316 bytes |
コンパイル時間 | 1,985 ms |
コンパイル使用メモリ | 77,480 KB |
実行使用メモリ | 41,276 KB |
最終ジャッジ日時 | 2024-06-11 07:40:28 |
合計ジャッジ時間 | 4,280 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 WA * 7 |
ソースコード
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); } }