結果
問題 | No.207 世界のなんとか |
ユーザー |
|
提出日時 | 2020-07-23 12:17:36 |
言語 | JavaScript (node v23.5.0) |
結果 |
AC
|
実行時間 | 68 ms / 5,000 ms |
コード長 | 518 bytes |
コンパイル時間 | 110 ms |
コンパイル使用メモリ | 6,948 KB |
実行使用メモリ | 39,296 KB |
最終ジャッジ日時 | 2024-06-23 17:29:19 |
合計ジャッジ時間 | 2,442 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
function main(input = '') {if (!input) throw Error;let lines = input.split('\n');let [begin, end] = lines[0].split(' ').map((val) => parseInt(val));let list = [];for (let i = begin; i <= end; i++) {if (i % 3 === 0 || String(i).includes('3')) list.push(i);}return list.join('\n');}const { readFileSync, existsSync } = require('fs');const stdin = '/dev/stdin';if (existsSync(stdin)) {const input = readFileSync(stdin, 'utf8');console.log(main(input));}module.exports = main;