結果
問題 | No.118 門松列(2) |
ユーザー |
![]() |
提出日時 | 2015-04-07 09:07:38 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 567 ms / 5,000 ms |
コード長 | 635 bytes |
コンパイル時間 | 2,283 ms |
コンパイル使用メモリ | 74,220 KB |
実行使用メモリ | 48,064 KB |
最終ジャッジ日時 | 2024-10-09 06:56:41 |
合計ジャッジ時間 | 14,105 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner koko = new Scanner(System.in); int n = koko.nextInt(); long[] b = new long[100]; for(int i=0; i<n; i++){ int length = koko.nextInt(); b[length-1]++; } long kado =0; for(int i=0; i<100; i++){ for(int j=i+1; j<100; j++){ for(int k=j+1; k<100; k++){ long c =b[i]*b[j]*b[k]; kado = (kado + c)%1000000007; } } } System.out.println(kado); } }