結果
| 問題 |
No.73 helloworld
|
| コンテスト | |
| ユーザー |
kou6839
|
| 提出日時 | 2014-12-02 20:46:02 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 129 ms / 5,000 ms |
| コード長 | 1,317 bytes |
| コンパイル時間 | 2,084 ms |
| コンパイル使用メモリ | 77,428 KB |
| 実行使用メモリ | 54,168 KB |
| 最終ジャッジ日時 | 2024-06-28 22:00:10 |
| 合計ジャッジ時間 | 4,394 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
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();
}
long 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);
}
}
kou6839