結果
| 問題 |
No.73 helloworld
|
| コンテスト | |
| ユーザー |
chiho_miyako
|
| 提出日時 | 2015-04-20 01:19:49 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,187 bytes |
| コンパイル時間 | 2,378 ms |
| コンパイル使用メモリ | 77,616 KB |
| 実行使用メモリ | 56,196 KB |
| 最終ジャッジ日時 | 2024-07-04 16:10:09 |
| 合計ジャッジ時間 | 4,945 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 6 RE * 1 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner koko = new Scanner(System.in);
int[] n = new int[26];
for(int i=0; i<26; i++){
n[i]=koko.nextInt();
}
int dn = n[3];
int en = n[4];
int hn = n[7];
int ln = n[11];
int on = n[14];
int rn = n[17];
int wn = n[22];
int o = 0;
if(on%2==0){
o=(on/2)*(on/2);
}else{
o=(on+1)*(on-1)/4;
}
long l=0;
if(ln%3==0){
if(ln>=3){
l=1;
}
for(int i=1; i<ln/3; i++){
l=l*(i+1)*(i+1)*(2*i+1)/(i*i*(2*i-1));
}
}else{
if(ln>3){
l=1;
}
int ama = ln%3;
int a=(ln-ama)/3;
for(int i=1; i<a; i++){
l=l*(i+1)*2*(i+1)*(2*i+1)/(i*2*i*(2*i-1));
}
int b = 1+(ln-3-ama)*2/3;
for(int i=0; i<ama; i++){
l=l*(b+2+i)/(b+i);
}
}
System.out.println(dn*en*hn*rn*wn*o*l);
}
}
chiho_miyako