結果

問題 No.976 2 の 128 乗と M
ユーザー 37zigen37zigen
提出日時 2020-01-31 21:42:26
言語 Java19
(openjdk 21)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 537 bytes
コンパイル時間 2,065 ms
コンパイル使用メモリ 83,320 KB
実行使用メモリ 57,680 KB
最終ジャッジ日時 2023-10-17 09:05:03
合計ジャッジ時間 10,291 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
57,476 KB
testcase_01 AC 123 ms
57,180 KB
testcase_02 AC 125 ms
57,284 KB
testcase_03 AC 126 ms
57,528 KB
testcase_04 AC 126 ms
55,512 KB
testcase_05 AC 126 ms
55,468 KB
testcase_06 AC 123 ms
55,408 KB
testcase_07 AC 124 ms
57,176 KB
testcase_08 AC 126 ms
57,596 KB
testcase_09 AC 126 ms
57,652 KB
testcase_10 AC 125 ms
57,220 KB
testcase_11 AC 125 ms
57,248 KB
testcase_12 AC 126 ms
57,504 KB
testcase_13 AC 124 ms
57,212 KB
testcase_14 AC 124 ms
57,208 KB
testcase_15 AC 124 ms
57,216 KB
testcase_16 AC 127 ms
57,604 KB
testcase_17 AC 116 ms
55,616 KB
testcase_18 AC 114 ms
56,248 KB
testcase_19 AC 127 ms
57,492 KB
testcase_20 AC 115 ms
56,252 KB
testcase_21 AC 126 ms
57,496 KB
testcase_22 AC 125 ms
57,536 KB
testcase_23 AC 129 ms
57,376 KB
testcase_24 AC 116 ms
56,292 KB
testcase_25 AC 126 ms
57,456 KB
testcase_26 AC 128 ms
55,464 KB
testcase_27 AC 125 ms
57,048 KB
testcase_28 AC 128 ms
57,520 KB
testcase_29 AC 126 ms
57,484 KB
testcase_30 AC 133 ms
57,512 KB
testcase_31 AC 127 ms
57,680 KB
testcase_32 AC 128 ms
55,828 KB
testcase_33 AC 116 ms
56,272 KB
testcase_34 AC 125 ms
57,428 KB
testcase_35 AC 128 ms
57,528 KB
testcase_36 AC 115 ms
54,240 KB
testcase_37 AC 126 ms
57,368 KB
testcase_38 AC 125 ms
57,240 KB
testcase_39 AC 127 ms
57,536 KB
testcase_40 AC 128 ms
57,556 KB
testcase_41 AC 125 ms
57,476 KB
testcase_42 AC 125 ms
57,524 KB
testcase_43 AC 126 ms
57,588 KB
testcase_44 AC 126 ms
57,608 KB
testcase_45 AC 127 ms
57,620 KB
testcase_46 AC 126 ms
57,504 KB
testcase_47 AC 128 ms
57,464 KB
testcase_48 AC 126 ms
57,564 KB
testcase_49 AC 126 ms
57,388 KB
testcase_50 AC 124 ms
57,448 KB
testcase_51 AC 127 ms
57,332 KB
testcase_52 AC 127 ms
57,556 KB
testcase_53 AC 127 ms
57,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;

// This file is a "Hello, world!" in Java language by OpenJDK for wandbox.

class Main
{
	public static void main(String[] args)
	{
		new Main().run();
	}
	
	void run(){
		Scanner sc=new Scanner(System.in);
		long m=sc.nextLong();
		long ans=1;
		for(int i=0;i<128;++i)ans=2*ans%m;
		System.out.println(ans);
	}
	
	void tr(Object...o){System.out.println(Arrays.deepToString(o));}
}
// OpenJDK reference:
//   http://openjdk.java.net/

// Java language references:
//   http://docs.oracle.com/javase
0