結果

問題 No.976 2 の 128 乗と M
ユーザー htensaihtensai
提出日時 2020-02-13 17:56:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 273 bytes
コンパイル時間 1,991 ms
コンパイル使用メモリ 73,840 KB
実行使用メモリ 41,524 KB
最終ジャッジ日時 2024-04-15 23:16:11
合計ジャッジ時間 10,054 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
41,272 KB
testcase_01 AC 116 ms
40,364 KB
testcase_02 AC 115 ms
40,080 KB
testcase_03 AC 127 ms
41,152 KB
testcase_04 AC 124 ms
41,040 KB
testcase_05 AC 114 ms
39,888 KB
testcase_06 AC 113 ms
39,888 KB
testcase_07 AC 114 ms
40,444 KB
testcase_08 AC 110 ms
39,844 KB
testcase_09 AC 115 ms
40,360 KB
testcase_10 AC 126 ms
41,524 KB
testcase_11 AC 126 ms
41,292 KB
testcase_12 AC 113 ms
40,480 KB
testcase_13 AC 113 ms
40,480 KB
testcase_14 AC 129 ms
41,040 KB
testcase_15 AC 113 ms
40,120 KB
testcase_16 AC 124 ms
41,412 KB
testcase_17 AC 114 ms
39,900 KB
testcase_18 AC 113 ms
40,084 KB
testcase_19 AC 113 ms
39,888 KB
testcase_20 AC 126 ms
41,296 KB
testcase_21 AC 113 ms
39,888 KB
testcase_22 AC 112 ms
40,248 KB
testcase_23 AC 122 ms
41,036 KB
testcase_24 AC 124 ms
41,160 KB
testcase_25 AC 113 ms
39,912 KB
testcase_26 AC 117 ms
40,532 KB
testcase_27 AC 119 ms
40,636 KB
testcase_28 AC 122 ms
41,032 KB
testcase_29 AC 110 ms
39,624 KB
testcase_30 AC 126 ms
41,156 KB
testcase_31 AC 125 ms
41,072 KB
testcase_32 AC 114 ms
40,252 KB
testcase_33 AC 111 ms
40,304 KB
testcase_34 AC 109 ms
39,884 KB
testcase_35 AC 123 ms
41,340 KB
testcase_36 AC 112 ms
40,052 KB
testcase_37 AC 111 ms
39,884 KB
testcase_38 AC 123 ms
41,412 KB
testcase_39 AC 114 ms
40,392 KB
testcase_40 AC 126 ms
41,264 KB
testcase_41 AC 112 ms
40,348 KB
testcase_42 AC 126 ms
41,468 KB
testcase_43 AC 113 ms
40,356 KB
testcase_44 AC 128 ms
41,344 KB
testcase_45 AC 112 ms
40,136 KB
testcase_46 AC 113 ms
40,080 KB
testcase_47 AC 113 ms
39,884 KB
testcase_48 AC 122 ms
41,120 KB
testcase_49 AC 114 ms
40,136 KB
testcase_50 AC 114 ms
40,024 KB
testcase_51 AC 113 ms
40,004 KB
testcase_52 AC 115 ms
39,944 KB
testcase_53 AC 116 ms
40,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		long m = sc.nextLong();
		long base = 1;
		for (int i = 0; i < 128; i++) {
		    base *= 2;
		    base %= m;
		}
		System.out.println(base);
   }
}
0