結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-10 14:57:39
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 1,000 ms
コード長 394 bytes
コンパイル時間 2,409 ms
コンパイル使用メモリ 70,984 KB
実行使用メモリ 57,936 KB
最終ジャッジ日時 2023-09-08 06:30:49
合計ジャッジ時間 7,516 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
56,080 KB
testcase_01 AC 127 ms
56,028 KB
testcase_02 AC 125 ms
55,800 KB
testcase_03 AC 129 ms
55,740 KB
testcase_04 AC 126 ms
55,708 KB
testcase_05 AC 125 ms
55,588 KB
testcase_06 AC 124 ms
55,900 KB
testcase_07 AC 126 ms
55,704 KB
testcase_08 AC 124 ms
55,824 KB
testcase_09 AC 125 ms
55,848 KB
testcase_10 AC 126 ms
55,992 KB
testcase_11 AC 126 ms
55,912 KB
testcase_12 AC 125 ms
55,824 KB
testcase_13 AC 126 ms
56,108 KB
testcase_14 AC 127 ms
56,296 KB
testcase_15 AC 124 ms
55,628 KB
testcase_16 AC 125 ms
55,740 KB
testcase_17 AC 126 ms
55,952 KB
testcase_18 AC 125 ms
55,692 KB
testcase_19 AC 124 ms
56,100 KB
testcase_20 AC 125 ms
55,696 KB
testcase_21 AC 129 ms
55,796 KB
testcase_22 AC 126 ms
57,936 KB
testcase_23 AC 126 ms
55,520 KB
testcase_24 AC 125 ms
55,928 KB
testcase_25 AC 125 ms
55,728 KB
testcase_26 AC 124 ms
55,716 KB
testcase_27 AC 124 ms
55,508 KB
testcase_28 AC 127 ms
56,032 KB
testcase_29 AC 126 ms
55,672 KB
testcase_30 AC 125 ms
55,516 KB
testcase_31 AC 125 ms
56,000 KB
testcase_32 AC 125 ms
56,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int n = sc.nextInt();
		int num = 0;
		
		int[] a = {2,3,5,7,11,13};
		int[] b = {4,6,8,9,10,12};
		for (int i=0; i<6; i++) {
			for (int j=0; j<6; j++) {
				if (a[i]*b[j]==n) {num++;}
			}
		}
		
		double x = num;
		double y = 36;
		System.out.println(x/y);
	}
}
0