結果

問題 No.118 門松列(2)
ユーザー kou6839kou6839
提出日時 2015-01-10 00:36:36
言語 Java21
(openjdk 21)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 566 bytes
コンパイル時間 3,288 ms
コンパイル使用メモリ 72,188 KB
実行使用メモリ 60,976 KB
最終ジャッジ日時 2023-09-03 22:54:34
合計ジャッジ時間 12,867 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 505 ms
60,468 KB
testcase_02 AC 502 ms
60,976 KB
testcase_03 AC 501 ms
60,440 KB
testcase_04 AC 474 ms
60,748 KB
testcase_05 AC 479 ms
60,452 KB
testcase_06 AC 134 ms
55,500 KB
testcase_07 AC 135 ms
55,816 KB
testcase_08 AC 137 ms
55,836 KB
testcase_09 AC 464 ms
60,164 KB
testcase_10 AC 286 ms
60,796 KB
testcase_11 AC 308 ms
60,428 KB
testcase_12 AC 260 ms
60,452 KB
testcase_13 AC 241 ms
59,348 KB
testcase_14 AC 462 ms
60,712 KB
testcase_15 AC 203 ms
59,184 KB
testcase_16 AC 408 ms
60,176 KB
testcase_17 AC 237 ms
59,176 KB
testcase_18 AC 320 ms
60,840 KB
testcase_19 AC 395 ms
60,520 KB
testcase_20 AC 378 ms
60,224 KB
testcase_21 AC 454 ms
60,092 KB
testcase_22 AC 305 ms
60,820 KB
testcase_23 AC 444 ms
60,352 KB
testcase_24 AC 325 ms
60,008 KB
testcase_25 AC 379 ms
60,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] ma = new int[101];
        for(int i=0;i<n;i++){
        	int a = sc.nextInt();
        	ma[a]++;
        }
        int ans=0;
        for(int i=1;i<=98;i++){
        	for(int j=i+1;j<=99;j++){
        		for(int k=j+1;k<=100;k++){
        			ans+=ma[i]*ma[j]*ma[k];
        			ans %= 1000000007;
        		}
        	}
        }
        System.out.println(ans);
    }
}		
0