結果

問題 No.1005 BOT対策
コンテスト
ユーザー study0826
提出日時 2020-10-04 12:45:45
言語 TypeScript
(6.0.2)
コンパイル:
tsc.sh -p tsconfig.json
実行:
node main.js ONLINE_JUDGE
結果
WA  
実行時間 -
コード長 286 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 5,483 ms
コンパイル使用メモリ 348,140 KB
実行使用メモリ 53,248 KB
最終ジャッジ日時 2026-06-05 04:48:40
合計ジャッジ時間 9,101 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 29
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

function issue(input: string) {

	const text: string[] = input.split('\r\n');

	const a: number = ( text[0].match( new RegExp( text[1], "g" ) ) || [] ).length ;

	if (a >= 0) {
		console.log(a);
	} else {
		console.log(-1);
	}
}

issue(require('fs').readFileSync('/dev/stdin', 'utf8'));
0