結果

問題 No.73 helloworld
ユーザー jp_stejp_ste
提出日時 2020-04-13 16:10:51
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 77 ms / 5,000 ms
コード長 574 bytes
コンパイル時間 83 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 39,552 KB
最終ジャッジ日時 2024-04-21 03:22:09
合計ジャッジ時間 1,825 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
39,552 KB
testcase_01 AC 77 ms
39,296 KB
testcase_02 AC 69 ms
39,296 KB
testcase_03 AC 70 ms
39,040 KB
testcase_04 AC 71 ms
39,296 KB
testcase_05 AC 70 ms
39,168 KB
testcase_06 AC 68 ms
39,040 KB
testcase_07 AC 77 ms
39,168 KB
testcase_08 AC 73 ms
39,296 KB
testcase_09 AC 73 ms
39,296 KB
testcase_10 AC 73 ms
39,296 KB
testcase_11 AC 73 ms
39,168 KB
testcase_12 AC 69 ms
39,424 KB
testcase_13 AC 71 ms
39,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function main(input) {
	input = input.split("\n");
	let c = [];
	for(let i=0; i<26; i++) {
	    c[i] = BigInt(input[i]);
	}
	let ans = c[3] * c[4] * c[7] * c[17] * c[22];
	
	const lNum = c[11];
	let max = 0n;
	for(let i=2n; i<=lNum; i++) {
	    const value = i * (i-1n) / 2n * (lNum - i);
	    if(value > max) max = value;
	}
	ans *= max;
	const oNum = c[14];
	max = 0n;
	for(let i=1n; i<=oNum; i++) {
	    const value = i * (oNum -i);
	    if(value > max) max = value;
	}
	ans *= max;
	console.log(ans.toString());
}

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