結果
| 問題 |
No.211 素数サイコロと合成数サイコロ (1)
|
| コンテスト | |
| ユーザー |
nCk_cv
|
| 提出日時 | 2015-08-05 01:29:20 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 135 ms / 1,000 ms |
| コード長 | 436 bytes |
| コンパイル時間 | 2,206 ms |
| コンパイル使用メモリ | 75,436 KB |
| 実行使用メモリ | 41,720 KB |
| 最終ジャッジ日時 | 2024-06-25 22:33:15 |
| 合計ジャッジ時間 | 7,361 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
ソースコード
import java.math.BigInteger;
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] a = new int[] {2,3,5,7,11,13};
int[] b = new int[] {4,6,8,9,10,12};
int k = sc.nextInt();
int count = 0;
for(int i = 0; i < 6; i++) {
for(int j = 0; j < 6; j++) {
if(a[i] * b[j] == k)count++;
}
}
System.out.printf("%.20f\n",count/36.0);
}
}
nCk_cv