結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー Ryota EnokidoRyota Enokido
提出日時 2018-12-13 21:48:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 1,000 ms
コード長 650 bytes
コンパイル時間 2,129 ms
コンパイル使用メモリ 74,536 KB
実行使用メモリ 57,648 KB
最終ジャッジ日時 2023-10-25 09:36:05
合計ジャッジ時間 8,331 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
57,564 KB
testcase_01 AC 135 ms
57,348 KB
testcase_02 AC 139 ms
57,460 KB
testcase_03 AC 136 ms
57,628 KB
testcase_04 AC 135 ms
57,632 KB
testcase_05 AC 136 ms
57,316 KB
testcase_06 AC 135 ms
57,420 KB
testcase_07 AC 137 ms
57,580 KB
testcase_08 AC 135 ms
57,504 KB
testcase_09 AC 137 ms
57,380 KB
testcase_10 AC 133 ms
57,436 KB
testcase_11 AC 135 ms
57,604 KB
testcase_12 AC 134 ms
57,640 KB
testcase_13 AC 137 ms
57,316 KB
testcase_14 AC 137 ms
57,424 KB
testcase_15 AC 134 ms
57,276 KB
testcase_16 AC 137 ms
57,432 KB
testcase_17 AC 134 ms
57,416 KB
testcase_18 AC 135 ms
57,560 KB
testcase_19 AC 135 ms
57,464 KB
testcase_20 AC 132 ms
57,512 KB
testcase_21 AC 134 ms
57,440 KB
testcase_22 AC 133 ms
57,648 KB
testcase_23 AC 138 ms
57,520 KB
testcase_24 AC 134 ms
57,416 KB
testcase_25 AC 134 ms
57,596 KB
testcase_26 AC 135 ms
57,432 KB
testcase_27 AC 135 ms
55,528 KB
testcase_28 AC 135 ms
57,512 KB
testcase_29 AC 136 ms
57,560 KB
testcase_30 AC 135 ms
57,424 KB
testcase_31 AC 133 ms
57,596 KB
testcase_32 AC 134 ms
57,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.lang.Math;
import java.lang.StringBuilder;
import java.util.regex.Pattern;
import java.util.Arrays;


    public class Main {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
  
            int k = sc.nextInt();
            double c = 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]==k){
                        c++;
                    }
                }
            }
            System.out.println(c/36);
        }
    }
0