結果

問題 No.747 循環小数N桁目 Hard
ユーザー 37zigen37zigen
提出日時 2020-03-22 06:35:24
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 715 bytes
コンパイル時間 3,649 ms
コンパイル使用メモリ 72,028 KB
実行使用メモリ 59,968 KB
最終ジャッジ日時 2023-08-26 03:12:20
合計ジャッジ時間 43,619 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
54,180 KB
testcase_01 AC 118 ms
56,276 KB
testcase_02 AC 119 ms
55,540 KB
testcase_03 AC 121 ms
55,836 KB
testcase_04 AC 119 ms
56,028 KB
testcase_05 AC 117 ms
55,508 KB
testcase_06 AC 117 ms
56,160 KB
testcase_07 AC 117 ms
55,680 KB
testcase_08 AC 119 ms
55,864 KB
testcase_09 AC 120 ms
56,092 KB
testcase_10 AC 120 ms
55,976 KB
testcase_11 AC 120 ms
56,276 KB
testcase_12 AC 120 ms
56,092 KB
testcase_13 AC 121 ms
55,864 KB
testcase_14 AC 121 ms
55,692 KB
testcase_15 AC 120 ms
55,800 KB
testcase_16 RE -
testcase_17 AC 118 ms
56,100 KB
testcase_18 AC 118 ms
55,924 KB
testcase_19 RE -
testcase_20 AC 119 ms
55,784 KB
testcase_21 AC 118 ms
55,892 KB
testcase_22 AC 119 ms
55,984 KB
testcase_23 AC 118 ms
55,956 KB
testcase_24 AC 119 ms
55,900 KB
testcase_25 AC 119 ms
56,440 KB
testcase_26 AC 118 ms
56,204 KB
testcase_27 RE -
testcase_28 AC 118 ms
56,144 KB
testcase_29 AC 118 ms
55,584 KB
testcase_30 RE -
testcase_31 AC 118 ms
55,812 KB
testcase_32 AC 118 ms
56,124 KB
testcase_33 AC 269 ms
56,512 KB
testcase_34 AC 254 ms
56,932 KB
testcase_35 AC 191 ms
56,488 KB
testcase_36 AC 251 ms
56,448 KB
testcase_37 AC 193 ms
56,840 KB
testcase_38 AC 287 ms
56,932 KB
testcase_39 AC 279 ms
57,072 KB
testcase_40 AC 391 ms
57,376 KB
testcase_41 AC 428 ms
56,644 KB
testcase_42 AC 271 ms
56,700 KB
testcase_43 RE -
testcase_44 AC 264 ms
56,596 KB
testcase_45 AC 385 ms
57,228 KB
testcase_46 AC 348 ms
56,852 KB
testcase_47 AC 271 ms
56,740 KB
testcase_48 AC 331 ms
57,624 KB
testcase_49 AC 251 ms
56,904 KB
testcase_50 AC 200 ms
56,860 KB
testcase_51 AC 228 ms
56,812 KB
testcase_52 AC 182 ms
56,592 KB
testcase_53 AC 518 ms
57,320 KB
testcase_54 AC 490 ms
59,304 KB
testcase_55 AC 562 ms
58,856 KB
testcase_56 AC 514 ms
59,776 KB
testcase_57 AC 270 ms
56,588 KB
testcase_58 AC 557 ms
59,312 KB
testcase_59 AC 253 ms
56,808 KB
testcase_60 AC 435 ms
59,040 KB
testcase_61 AC 381 ms
58,944 KB
testcase_62 AC 355 ms
58,960 KB
testcase_63 AC 287 ms
56,780 KB
testcase_64 AC 282 ms
59,224 KB
testcase_65 AC 170 ms
56,136 KB
testcase_66 AC 259 ms
57,180 KB
testcase_67 AC 307 ms
56,852 KB
testcase_68 AC 383 ms
55,120 KB
testcase_69 AC 273 ms
56,420 KB
testcase_70 AC 270 ms
57,004 KB
testcase_71 RE -
testcase_72 AC 331 ms
56,700 KB
testcase_73 AC 382 ms
56,912 KB
testcase_74 AC 260 ms
56,320 KB
testcase_75 RE -
testcase_76 AC 312 ms
57,360 KB
testcase_77 RE -
testcase_78 RE -
testcase_79 AC 266 ms
56,796 KB
testcase_80 RE -
testcase_81 AC 195 ms
56,772 KB
testcase_82 AC 254 ms
56,944 KB
testcase_83 AC 198 ms
56,388 KB
testcase_84 RE -
testcase_85 RE -
testcase_86 AC 227 ms
56,684 KB
testcase_87 AC 420 ms
56,396 KB
testcase_88 AC 313 ms
56,940 KB
testcase_89 AC 224 ms
56,320 KB
testcase_90 AC 362 ms
56,704 KB
testcase_91 AC 418 ms
58,128 KB
testcase_92 AC 256 ms
56,340 KB
testcase_93 AC 384 ms
57,176 KB
testcase_94 AC 508 ms
59,580 KB
testcase_95 AC 541 ms
59,968 KB
testcase_96 AC 500 ms
59,032 KB
testcase_97 AC 542 ms
59,032 KB
testcase_98 AC 647 ms
59,064 KB
testcase_99 AC 458 ms
59,240 KB
testcase_100 AC 404 ms
59,004 KB
testcase_101 AC 264 ms
56,764 KB
testcase_102 AC 369 ms
56,876 KB
testcase_103 RE -
testcase_104 AC 479 ms
59,316 KB
testcase_105 AC 484 ms
59,756 KB
testcase_106 AC 373 ms
57,280 KB
testcase_107 AC 368 ms
56,808 KB
testcase_108 AC 489 ms
59,512 KB
testcase_109 AC 388 ms
57,532 KB
testcase_110 AC 475 ms
59,292 KB
testcase_111 AC 495 ms
58,860 KB
testcase_112 AC 362 ms
56,980 KB
testcase_113 AC 499 ms
59,340 KB
testcase_114 RE -
testcase_115 AC 371 ms
54,840 KB
testcase_116 AC 494 ms
59,440 KB
testcase_117 RE -
testcase_118 AC 466 ms
59,068 KB
testcase_119 AC 357 ms
57,136 KB
testcase_120 AC 366 ms
56,744 KB
testcase_121 AC 499 ms
57,696 KB
testcase_122 AC 465 ms
59,056 KB
testcase_123 AC 491 ms
59,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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));
	}

}
0