結果
問題 | No.747 循環小数N桁目 Hard |
ユーザー | 37zigen |
提出日時 | 2020-03-22 06:35:24 |
言語 | Java21 (openjdk 21) |
結果 |
RE
|
実行時間 | - |
コード長 | 715 bytes |
コンパイル時間 | 1,988 ms |
コンパイル使用メモリ | 75,444 KB |
実行使用メモリ | 44,260 KB |
最終ジャッジ日時 | 2024-06-06 22:08:13 |
合計ジャッジ時間 | 36,408 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 107 ms
40,268 KB |
testcase_01 | AC | 102 ms
41,028 KB |
testcase_02 | AC | 112 ms
41,020 KB |
testcase_03 | AC | 108 ms
41,120 KB |
testcase_04 | AC | 102 ms
39,696 KB |
testcase_05 | AC | 108 ms
41,288 KB |
testcase_06 | AC | 114 ms
41,076 KB |
testcase_07 | AC | 109 ms
41,136 KB |
testcase_08 | AC | 102 ms
39,728 KB |
testcase_09 | AC | 109 ms
41,044 KB |
testcase_10 | AC | 104 ms
40,684 KB |
testcase_11 | AC | 109 ms
40,788 KB |
testcase_12 | AC | 106 ms
40,624 KB |
testcase_13 | AC | 98 ms
41,292 KB |
testcase_14 | AC | 105 ms
39,660 KB |
testcase_15 | AC | 105 ms
40,812 KB |
testcase_16 | RE | - |
testcase_17 | AC | 105 ms
41,044 KB |
testcase_18 | AC | 95 ms
41,528 KB |
testcase_19 | RE | - |
testcase_20 | AC | 104 ms
40,844 KB |
testcase_21 | AC | 111 ms
40,992 KB |
testcase_22 | AC | 113 ms
40,800 KB |
testcase_23 | AC | 112 ms
41,024 KB |
testcase_24 | AC | 101 ms
39,768 KB |
testcase_25 | AC | 99 ms
41,140 KB |
testcase_26 | AC | 107 ms
41,048 KB |
testcase_27 | RE | - |
testcase_28 | AC | 104 ms
40,872 KB |
testcase_29 | AC | 110 ms
40,816 KB |
testcase_30 | RE | - |
testcase_31 | AC | 111 ms
40,948 KB |
testcase_32 | AC | 97 ms
40,620 KB |
testcase_33 | AC | 256 ms
42,812 KB |
testcase_34 | AC | 246 ms
41,696 KB |
testcase_35 | AC | 176 ms
41,792 KB |
testcase_36 | AC | 201 ms
42,180 KB |
testcase_37 | AC | 184 ms
41,780 KB |
testcase_38 | AC | 281 ms
42,348 KB |
testcase_39 | AC | 267 ms
42,288 KB |
testcase_40 | AC | 339 ms
42,920 KB |
testcase_41 | AC | 371 ms
43,672 KB |
testcase_42 | AC | 264 ms
42,028 KB |
testcase_43 | RE | - |
testcase_44 | AC | 240 ms
42,440 KB |
testcase_45 | AC | 346 ms
42,796 KB |
testcase_46 | AC | 301 ms
43,124 KB |
testcase_47 | AC | 236 ms
42,340 KB |
testcase_48 | AC | 295 ms
42,720 KB |
testcase_49 | AC | 220 ms
42,436 KB |
testcase_50 | AC | 177 ms
41,488 KB |
testcase_51 | AC | 206 ms
41,796 KB |
testcase_52 | AC | 166 ms
41,192 KB |
testcase_53 | AC | 479 ms
43,812 KB |
testcase_54 | AC | 467 ms
43,540 KB |
testcase_55 | AC | 532 ms
43,344 KB |
testcase_56 | AC | 448 ms
43,616 KB |
testcase_57 | AC | 240 ms
42,080 KB |
testcase_58 | AC | 467 ms
43,960 KB |
testcase_59 | AC | 203 ms
41,692 KB |
testcase_60 | AC | 357 ms
43,336 KB |
testcase_61 | AC | 341 ms
43,768 KB |
testcase_62 | AC | 309 ms
43,068 KB |
testcase_63 | AC | 273 ms
42,408 KB |
testcase_64 | AC | 250 ms
42,232 KB |
testcase_65 | AC | 150 ms
41,004 KB |
testcase_66 | AC | 224 ms
42,616 KB |
testcase_67 | AC | 315 ms
43,336 KB |
testcase_68 | AC | 359 ms
43,072 KB |
testcase_69 | AC | 264 ms
42,588 KB |
testcase_70 | AC | 251 ms
41,908 KB |
testcase_71 | RE | - |
testcase_72 | AC | 290 ms
42,356 KB |
testcase_73 | AC | 332 ms
42,852 KB |
testcase_74 | AC | 278 ms
42,904 KB |
testcase_75 | RE | - |
testcase_76 | AC | 293 ms
42,600 KB |
testcase_77 | RE | - |
testcase_78 | RE | - |
testcase_79 | AC | 258 ms
42,980 KB |
testcase_80 | RE | - |
testcase_81 | AC | 177 ms
41,124 KB |
testcase_82 | AC | 194 ms
41,688 KB |
testcase_83 | AC | 160 ms
41,512 KB |
testcase_84 | RE | - |
testcase_85 | RE | - |
testcase_86 | AC | 192 ms
42,068 KB |
testcase_87 | AC | 363 ms
43,324 KB |
testcase_88 | AC | 283 ms
42,224 KB |
testcase_89 | AC | 202 ms
42,200 KB |
testcase_90 | AC | 323 ms
43,148 KB |
testcase_91 | AC | 340 ms
43,004 KB |
testcase_92 | AC | 230 ms
42,268 KB |
testcase_93 | AC | 333 ms
42,872 KB |
testcase_94 | AC | 425 ms
43,332 KB |
testcase_95 | AC | 468 ms
43,420 KB |
testcase_96 | AC | 431 ms
43,144 KB |
testcase_97 | AC | 512 ms
43,252 KB |
testcase_98 | AC | 610 ms
44,260 KB |
testcase_99 | AC | 434 ms
43,288 KB |
testcase_100 | AC | 378 ms
43,076 KB |
testcase_101 | AC | 250 ms
42,232 KB |
testcase_102 | AC | 355 ms
42,904 KB |
testcase_103 | RE | - |
testcase_104 | AC | 453 ms
43,500 KB |
testcase_105 | AC | 402 ms
42,816 KB |
testcase_106 | AC | 324 ms
42,844 KB |
testcase_107 | AC | 318 ms
42,864 KB |
testcase_108 | AC | 426 ms
43,688 KB |
testcase_109 | AC | 311 ms
43,556 KB |
testcase_110 | AC | 425 ms
43,388 KB |
testcase_111 | AC | 451 ms
43,548 KB |
testcase_112 | AC | 287 ms
42,916 KB |
testcase_113 | AC | 450 ms
42,580 KB |
testcase_114 | RE | - |
testcase_115 | AC | 310 ms
43,892 KB |
testcase_116 | AC | 429 ms
42,624 KB |
testcase_117 | RE | - |
testcase_118 | AC | 386 ms
43,364 KB |
testcase_119 | AC | 313 ms
42,812 KB |
testcase_120 | AC | 278 ms
43,760 KB |
testcase_121 | AC | 433 ms
43,192 KB |
testcase_122 | AC | 416 ms
43,368 KB |
testcase_123 | AC | 453 ms
43,160 KB |
ソースコード
import java.io.FileNotFoundException; import java.math.BigInteger; import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) throws FileNotFoundException { long t = System.currentTimeMillis(); new Main().run(); System.err.println(System.currentTimeMillis() - t); } void run() { Scanner sc = new Scanner(System.in); BigInteger N=new BigInteger(sc.next()).mod(BigInteger.valueOf(6)); BigInteger K=new BigInteger(sc.next()); N=N.modPow(K, BigInteger.valueOf(6)); int[] ans=new int[] {2,8,5,7,1,4}; System.out.println(ans[N.intValue()-1]); } static void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }