結果

問題 No.207 世界のなんとか
ユーザー intercept6intercept6
提出日時 2020-07-30 15:36:13
言語 TypeScript
(5.4.3)
結果
AC  
実行時間 83 ms / 5,000 ms
コード長 438 bytes
コンパイル時間 7,816 ms
コンパイル使用メモリ 253,052 KB
実行使用メモリ 42,660 KB
最終ジャッジ日時 2023-09-17 04:49:19
合計ジャッジ時間 10,723 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
42,404 KB
testcase_01 AC 79 ms
42,036 KB
testcase_02 AC 82 ms
42,488 KB
testcase_03 AC 80 ms
42,224 KB
testcase_04 AC 80 ms
42,292 KB
testcase_05 AC 80 ms
42,392 KB
testcase_06 AC 78 ms
42,136 KB
testcase_07 AC 77 ms
42,036 KB
testcase_08 AC 78 ms
42,164 KB
testcase_09 AC 81 ms
42,308 KB
testcase_10 AC 82 ms
42,644 KB
testcase_11 AC 82 ms
42,596 KB
testcase_12 AC 83 ms
42,660 KB
testcase_13 AC 82 ms
42,300 KB
testcase_14 AC 83 ms
42,652 KB
testcase_15 AC 81 ms
42,568 KB
testcase_16 AC 78 ms
42,092 KB
testcase_17 AC 77 ms
42,172 KB
testcase_18 AC 71 ms
42,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import { readFileSync } from 'fs';

function Main(input: string) {
  const data = input.split('\n');

  const firstLine = data[0].split(' ');

  const start = parseInt(firstLine[0]);
  const end = parseInt(firstLine[1]);

  for (let i = start; i <= end; i++) {
    if (i % 3 === 0) {
      console.log(i);
      continue;
    }

    if (String(i).match(/3/)) {
      console.log(i);
    }
  }
}

Main(readFileSync('/dev/stdin', 'utf8'));
0