結果

問題 No.747 循環小数N桁目 Hard
ユーザー tentententen
提出日時 2020-09-01 17:19:53
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 601 bytes
コンパイル時間 2,176 ms
コンパイル使用メモリ 74,200 KB
実行使用メモリ 42,436 KB
最終ジャッジ日時 2024-04-30 00:46:27
合計ジャッジ時間 27,662 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
40,844 KB
testcase_01 AC 127 ms
40,964 KB
testcase_02 AC 130 ms
41,240 KB
testcase_03 AC 134 ms
41,044 KB
testcase_04 AC 132 ms
41,068 KB
testcase_05 AC 137 ms
41,012 KB
testcase_06 AC 132 ms
41,000 KB
testcase_07 AC 130 ms
41,052 KB
testcase_08 AC 131 ms
41,384 KB
testcase_09 WA -
testcase_10 AC 136 ms
41,052 KB
testcase_11 AC 140 ms
40,976 KB
testcase_12 AC 135 ms
41,268 KB
testcase_13 AC 128 ms
41,240 KB
testcase_14 WA -
testcase_15 AC 128 ms
41,060 KB
testcase_16 AC 129 ms
41,360 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 130 ms
41,116 KB
testcase_20 AC 113 ms
39,848 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 130 ms
40,968 KB
testcase_24 AC 128 ms
41,044 KB
testcase_25 WA -
testcase_26 AC 130 ms
40,892 KB
testcase_27 AC 128 ms
40,980 KB
testcase_28 AC 127 ms
41,164 KB
testcase_29 AC 124 ms
41,172 KB
testcase_30 AC 125 ms
40,968 KB
testcase_31 AC 125 ms
40,952 KB
testcase_32 AC 127 ms
41,064 KB
testcase_33 AC 201 ms
41,880 KB
testcase_34 AC 167 ms
41,716 KB
testcase_35 AC 175 ms
41,464 KB
testcase_36 AC 180 ms
41,484 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 AC 192 ms
41,840 KB
testcase_41 AC 193 ms
41,808 KB
testcase_42 AC 186 ms
41,920 KB
testcase_43 AC 177 ms
41,340 KB
testcase_44 AC 174 ms
41,620 KB
testcase_45 AC 189 ms
41,972 KB
testcase_46 AC 185 ms
41,772 KB
testcase_47 AC 190 ms
41,920 KB
testcase_48 AC 180 ms
41,468 KB
testcase_49 AC 181 ms
41,580 KB
testcase_50 AC 154 ms
41,692 KB
testcase_51 WA -
testcase_52 WA -
testcase_53 AC 205 ms
42,200 KB
testcase_54 AC 194 ms
42,084 KB
testcase_55 AC 202 ms
42,072 KB
testcase_56 WA -
testcase_57 AC 180 ms
41,732 KB
testcase_58 AC 202 ms
42,228 KB
testcase_59 AC 174 ms
41,552 KB
testcase_60 AC 201 ms
42,148 KB
testcase_61 AC 197 ms
41,976 KB
testcase_62 AC 209 ms
41,856 KB
testcase_63 AC 194 ms
41,740 KB
testcase_64 WA -
testcase_65 AC 144 ms
40,968 KB
testcase_66 AC 181 ms
42,156 KB
testcase_67 AC 187 ms
41,512 KB
testcase_68 WA -
testcase_69 AC 187 ms
41,332 KB
testcase_70 AC 154 ms
41,264 KB
testcase_71 AC 167 ms
41,336 KB
testcase_72 AC 175 ms
41,760 KB
testcase_73 AC 190 ms
41,748 KB
testcase_74 AC 195 ms
41,496 KB
testcase_75 AC 179 ms
41,556 KB
testcase_76 AC 176 ms
41,364 KB
testcase_77 AC 178 ms
41,600 KB
testcase_78 AC 193 ms
41,756 KB
testcase_79 AC 185 ms
41,632 KB
testcase_80 AC 188 ms
41,956 KB
testcase_81 AC 168 ms
41,380 KB
testcase_82 AC 164 ms
41,544 KB
testcase_83 AC 173 ms
41,424 KB
testcase_84 AC 193 ms
41,996 KB
testcase_85 AC 185 ms
41,512 KB
testcase_86 AC 180 ms
41,612 KB
testcase_87 WA -
testcase_88 AC 171 ms
41,656 KB
testcase_89 AC 168 ms
41,816 KB
testcase_90 WA -
testcase_91 AC 193 ms
41,372 KB
testcase_92 AC 180 ms
41,328 KB
testcase_93 AC 182 ms
41,796 KB
testcase_94 AC 201 ms
42,304 KB
testcase_95 AC 211 ms
42,052 KB
testcase_96 AC 212 ms
42,136 KB
testcase_97 AC 199 ms
42,016 KB
testcase_98 AC 203 ms
42,320 KB
testcase_99 WA -
testcase_100 AC 197 ms
42,284 KB
testcase_101 WA -
testcase_102 AC 185 ms
41,888 KB
testcase_103 AC 204 ms
42,380 KB
testcase_104 AC 194 ms
42,232 KB
testcase_105 AC 203 ms
42,052 KB
testcase_106 AC 195 ms
41,896 KB
testcase_107 AC 191 ms
41,596 KB
testcase_108 AC 193 ms
41,780 KB
testcase_109 AC 201 ms
42,436 KB
testcase_110 AC 195 ms
41,880 KB
testcase_111 AC 209 ms
41,796 KB
testcase_112 AC 203 ms
42,064 KB
testcase_113 WA -
testcase_114 AC 199 ms
41,812 KB
testcase_115 AC 208 ms
41,940 KB
testcase_116 AC 193 ms
41,972 KB
testcase_117 AC 191 ms
41,700 KB
testcase_118 AC 195 ms
41,852 KB
testcase_119 AC 195 ms
41,980 KB
testcase_120 AC 192 ms
41,632 KB
testcase_121 AC 192 ms
41,384 KB
testcase_122 AC 193 ms
41,856 KB
testcase_123 AC 208 ms
42,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = getNum(sc.next().toCharArray());
    	int k = getNum(sc.next().toCharArray());
    	char[] arr = "285714".toCharArray();
    	int ans = 1;
    	for (int i = 0; i < k; i++) {
    	    ans *= n;
    	    ans %= 6;
    	}
    	ans = (ans - 1 + 6) % 6;
    	System.out.println(arr[ans]);
    }
    
    static int getNum(char[] arr) {
        int ans = 0;
        for (char c : arr) {
            ans = (ans * 10 + c - '0') % 6;
        }
        return ans;
    }
}
0