結果
問題 | No.207 世界のなんとか |
ユーザー |
|
提出日時 | 2019-04-26 18:51:58 |
言語 | JavaScript (node v23.5.0) |
結果 |
AC
|
実行時間 | 70 ms / 5,000 ms |
コード長 | 560 bytes |
コンパイル時間 | 142 ms |
コンパイル使用メモリ | 6,692 KB |
実行使用メモリ | 39,552 KB |
最終ジャッジ日時 | 2024-10-13 01:07:00 |
合計ジャッジ時間 | 2,013 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
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();