結果

問題 No.773 コンテスト
ユーザー d3etbkucsasgy
提出日時 2019-01-07 17:30:42
言語 JavaScript
(node v23.5.0)
結果
WA  
実行時間 -
コード長 897 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 39,680 KB
最終ジャッジ日時 2024-10-13 00:56:43
合計ジャッジ時間 2,315 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

// process.stdin.resume();
// process.stdin.setEncoding('utf8');
// Here your code !


// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
	input = input.split(" ");
	let firstDay = input[0];
	let lastDay = input[1];
	const firstEventDay = 23;
	const lastEventDay = 25;
	
	if (lastDay < firstEventDay) {
	    console.log(3);
	    return;
	} else if (lastEventDay < firstDay) {
	    console.log(3);
	    return;
	}
	if (firstDay < firstEventDay && lastEventDay < lastDay) {
	    console.log(0);
	    return;
	}
	if (lastDay <= lastEventDay) {
	    console.log(lastEventDay - lastDay);
	    return;
	}
	console.log(lastEventDay - firstDay);
}
//*この行以降は編集しないでください(標準入出力から一度に読み込み、Mainを呼び出します)
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


0