結果

問題 No.118 門松列(2)
ユーザー kou6839kou6839
提出日時 2015-01-10 00:36:36
言語 Java21
(openjdk 21)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 566 bytes
コンパイル時間 3,513 ms
コンパイル使用メモリ 74,644 KB
実行使用メモリ 48,128 KB
最終ジャッジ日時 2024-06-13 03:32:26
合計ジャッジ時間 13,442 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 596 ms
47,956 KB
testcase_02 AC 556 ms
47,800 KB
testcase_03 AC 514 ms
48,060 KB
testcase_04 AC 604 ms
48,128 KB
testcase_05 AC 575 ms
47,892 KB
testcase_06 AC 133 ms
41,404 KB
testcase_07 AC 135 ms
41,268 KB
testcase_08 AC 138 ms
41,576 KB
testcase_09 AC 455 ms
46,596 KB
testcase_10 AC 277 ms
47,488 KB
testcase_11 AC 320 ms
47,560 KB
testcase_12 AC 269 ms
46,596 KB
testcase_13 AC 243 ms
45,872 KB
testcase_14 AC 542 ms
48,100 KB
testcase_15 AC 202 ms
43,068 KB
testcase_16 AC 486 ms
47,716 KB
testcase_17 AC 236 ms
45,956 KB
testcase_18 AC 341 ms
48,016 KB
testcase_19 AC 466 ms
47,924 KB
testcase_20 AC 444 ms
47,804 KB
testcase_21 AC 516 ms
48,116 KB
testcase_22 AC 284 ms
47,604 KB
testcase_23 AC 489 ms
48,100 KB
testcase_24 AC 341 ms
47,764 KB
testcase_25 AC 397 ms
47,804 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