結果

問題 No.207 世界のなんとか
コンテスト
ユーザー はとばねぇ
提出日時 2019-04-26 18:51:58
言語 JavaScript
(node v26.7.0 + ACL)
コンパイル:
true
実行:
node _filename_ ONLINE_JUDGE
結果
AC  
実行時間 38 ms / 5,000 ms
+ 488µs
コード長 560 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3 ms
コンパイル使用メモリ 6,528 KB
実行使用メモリ 49,920 KB
最終ジャッジ日時 2026-09-15 06:33:25
合計ジャッジ時間 2,061 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

class Answer {
	constructor(input) {
		const data = input.split(' ').map(Number);
		this.A = data[0];
		this.B = data[1];
		this.ans = false;
	}

	main() {
		let len = this.B + 1;
		for(let i=this.A;len>i;i++) {
			this.checkTextual(i);
			this.checkMultiple(i);
			if(this.ans) this.dest(i);
		}
	}

	checkTextual(num) {
		if(/3/.test(String(num))) this.ans = true;
	}

	checkMultiple(num) {
		if(num % 3 === 0) this.ans = true;
	}

	dest(ans) {
		console.log(ans);
		this.ans = false;
	}
}
new Answer(require("fs").readFileSync("/dev/stdin", "utf8")).main();
0