結果

問題 No.976 2 の 128 乗と M
ユーザー jp_ste
提出日時 2020-04-10 09:01:42
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 41,328 KB
最終ジャッジ日時 2024-10-13 01:41:16
合計ジャッジ時間 4,273 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

function main(input) {
	input = input.split("\n");
	const m = BigInt(input[0]);
	let ans = 1n;
	for(let i=0; i<128; i++) {
	    ans *= 2n;
	    ans %= m;
	}
	console.log(ans.toString());
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
0