結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー YOSHI
提出日時 2021-03-06 12:43:34
言語 Java
(openjdk 23)
結果
AC  
実行時間 66 ms / 1,000 ms
コード長 543 bytes
コンパイル時間 5,136 ms
コンパイル使用メモリ 73,532 KB
実行使用メモリ 37,248 KB
最終ジャッジ日時 2024-10-08 09:39:55
合計ジャッジ時間 8,596 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No00000211_Main {

	public static void main(String[] args) throws IOException {

		int[] a = {2,3,5,7,11,13};
		int[] b = {4,6,8,9,10,12};

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int cnt = 0;
		int k = Integer.parseInt(br.readLine());
		for(int i = 0; i < 6; i++) {
			for(int j = 0; j < 6; j++) {
				if(k == a[i] * b[j]) {
					cnt++;
				}
			}
		}
		System.out.println((double)cnt / 36);
	}
}
0