結果
問題 | No.308 素数は通れません |
ユーザー | uafr_cs |
提出日時 | 2015-12-02 22:37:19 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,661 bytes |
コンパイル時間 | 2,330 ms |
コンパイル使用メモリ | 78,516 KB |
実行使用メモリ | 53,752 KB |
最終ジャッジ日時 | 2024-09-14 08:05:35 |
合計ジャッジ時間 | 18,083 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 130 ms
41,068 KB |
testcase_01 | AC | 128 ms
40,836 KB |
testcase_02 | AC | 128 ms
40,924 KB |
testcase_03 | AC | 128 ms
40,720 KB |
testcase_04 | AC | 130 ms
41,236 KB |
testcase_05 | AC | 128 ms
41,120 KB |
testcase_06 | AC | 126 ms
41,096 KB |
testcase_07 | AC | 128 ms
41,188 KB |
testcase_08 | AC | 128 ms
40,932 KB |
testcase_09 | WA | - |
testcase_10 | AC | 127 ms
40,716 KB |
testcase_11 | AC | 125 ms
40,668 KB |
testcase_12 | AC | 124 ms
40,920 KB |
testcase_13 | AC | 122 ms
40,928 KB |
testcase_14 | WA | - |
testcase_15 | AC | 124 ms
40,800 KB |
testcase_16 | AC | 129 ms
40,716 KB |
testcase_17 | AC | 127 ms
41,056 KB |
testcase_18 | AC | 114 ms
39,540 KB |
testcase_19 | AC | 131 ms
40,940 KB |
testcase_20 | AC | 128 ms
40,956 KB |
testcase_21 | AC | 129 ms
41,164 KB |
testcase_22 | AC | 125 ms
40,816 KB |
testcase_23 | AC | 127 ms
40,820 KB |
testcase_24 | AC | 125 ms
40,980 KB |
testcase_25 | AC | 124 ms
41,052 KB |
testcase_26 | AC | 127 ms
40,852 KB |
testcase_27 | AC | 125 ms
40,772 KB |
testcase_28 | AC | 110 ms
40,280 KB |
testcase_29 | AC | 126 ms
40,964 KB |
testcase_30 | AC | 114 ms
39,772 KB |
testcase_31 | AC | 123 ms
40,896 KB |
testcase_32 | WA | - |
testcase_33 | AC | 110 ms
40,148 KB |
testcase_34 | AC | 113 ms
39,904 KB |
testcase_35 | AC | 124 ms
41,020 KB |
testcase_36 | AC | 124 ms
41,096 KB |
testcase_37 | AC | 128 ms
41,124 KB |
testcase_38 | AC | 126 ms
40,796 KB |
testcase_39 | AC | 123 ms
40,824 KB |
testcase_40 | AC | 124 ms
40,544 KB |
testcase_41 | AC | 114 ms
40,260 KB |
testcase_42 | AC | 121 ms
40,916 KB |
testcase_43 | AC | 110 ms
39,764 KB |
testcase_44 | AC | 113 ms
39,736 KB |
testcase_45 | AC | 126 ms
40,808 KB |
testcase_46 | AC | 125 ms
40,980 KB |
testcase_47 | AC | 126 ms
40,776 KB |
testcase_48 | AC | 126 ms
41,024 KB |
testcase_49 | AC | 123 ms
40,628 KB |
testcase_50 | AC | 109 ms
39,972 KB |
testcase_51 | AC | 124 ms
41,032 KB |
testcase_52 | AC | 125 ms
40,676 KB |
testcase_53 | AC | 121 ms
41,056 KB |
testcase_54 | AC | 122 ms
40,900 KB |
testcase_55 | AC | 125 ms
40,832 KB |
testcase_56 | AC | 124 ms
40,612 KB |
testcase_57 | AC | 111 ms
40,124 KB |
testcase_58 | AC | 123 ms
40,772 KB |
testcase_59 | AC | 123 ms
40,940 KB |
testcase_60 | AC | 122 ms
40,784 KB |
testcase_61 | AC | 124 ms
40,896 KB |
testcase_62 | AC | 125 ms
41,028 KB |
testcase_63 | AC | 126 ms
41,112 KB |
testcase_64 | AC | 126 ms
41,032 KB |
testcase_65 | AC | 123 ms
40,672 KB |
testcase_66 | AC | 124 ms
40,820 KB |
testcase_67 | AC | 111 ms
40,172 KB |
testcase_68 | AC | 112 ms
40,004 KB |
testcase_69 | AC | 125 ms
40,780 KB |
testcase_70 | AC | 129 ms
40,968 KB |
testcase_71 | AC | 126 ms
40,716 KB |
testcase_72 | AC | 129 ms
40,680 KB |
testcase_73 | AC | 124 ms
40,840 KB |
testcase_74 | AC | 114 ms
39,960 KB |
testcase_75 | AC | 113 ms
39,932 KB |
testcase_76 | WA | - |
testcase_77 | AC | 113 ms
39,932 KB |
testcase_78 | AC | 126 ms
40,824 KB |
testcase_79 | AC | 126 ms
40,876 KB |
testcase_80 | WA | - |
testcase_81 | WA | - |
testcase_82 | AC | 125 ms
40,812 KB |
testcase_83 | AC | 125 ms
40,832 KB |
testcase_84 | WA | - |
testcase_85 | AC | 126 ms
40,904 KB |
testcase_86 | WA | - |
testcase_87 | WA | - |
testcase_88 | AC | 127 ms
41,068 KB |
testcase_89 | AC | 125 ms
40,892 KB |
testcase_90 | WA | - |
testcase_91 | AC | 124 ms
41,184 KB |
testcase_92 | AC | 123 ms
40,904 KB |
testcase_93 | AC | 125 ms
40,756 KB |
testcase_94 | AC | 126 ms
40,792 KB |
testcase_95 | AC | 124 ms
41,032 KB |
testcase_96 | AC | 110 ms
39,844 KB |
testcase_97 | AC | 122 ms
40,896 KB |
testcase_98 | AC | 109 ms
39,876 KB |
testcase_99 | AC | 126 ms
40,844 KB |
testcase_100 | AC | 124 ms
41,032 KB |
testcase_101 | WA | - |
testcase_102 | AC | 124 ms
40,852 KB |
testcase_103 | AC | 126 ms
41,088 KB |
testcase_104 | AC | 124 ms
41,184 KB |
testcase_105 | AC | 126 ms
40,924 KB |
testcase_106 | AC | 124 ms
40,984 KB |
ソースコード
import java.math.BigInteger; import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); BigInteger N = new BigInteger(sc.next()); final BigInteger four = BigInteger.valueOf(4); final BigInteger six = BigInteger.valueOf(6); final BigInteger eight = BigInteger.valueOf(8); final BigInteger nine = BigInteger.valueOf(9); final BigInteger ten = BigInteger.valueOf(10); final BigInteger twelve = BigInteger.valueOf(12); final BigInteger fourteen = BigInteger.valueOf(14); final BigInteger fifteen = BigInteger.valueOf(15); final BigInteger sixteen = BigInteger.valueOf(16); final BigInteger eighteen = BigInteger.valueOf(18); final BigInteger twenty = BigInteger.valueOf(20); final BigInteger twentyone = BigInteger.valueOf(21); final BigInteger twentytwo = BigInteger.valueOf(22); final BigInteger twentyfour = BigInteger.valueOf(24); if(N.equals(four)){ System.out.println(3); }else if(N.equals(six)){ System.out.println(5); }else if(N.equals(eight) || N.equals(nine) || N.equals(ten) || N.equals(fifteen) || N.equals(sixteen) || N.equals(twentytwo)){ System.out.println(7); }else if(N.equals(twelve)){ System.out.println(11); }else if(N.equals(fourteen)){ System.out.println(13); }else if(N.equals(eighteen)){ System.out.println(17); }else if(N.equals(twenty) || N.equals(twentyone)){ System.out.println(19); }else if(N.equals(twentyfour)){ System.out.println(23); }else{ System.out.println(8); } } }