結果
| 問題 |
No.345 最小チワワ問題
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-08-10 13:30:35 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 575 bytes |
| コンパイル時間 | 11,130 ms |
| コンパイル使用メモリ | 168,352 KB |
| 実行使用メモリ | 185,248 KB |
| 最終ジャッジ日時 | 2024-09-20 23:27:01 |
| 合計ジャッジ時間 | 11,232 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 8 WA * 21 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (152 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;
class Program
{
static void Main()
{
var inp = Console.ReadLine();
var searchChiwawa = new SearchString();
searchChiwawa.SearchChiwawa(inp);
}
}
class SearchString
{
public void SearchChiwawa(string alph)
{
// 正規表現でcww文字列を検索
Match regResult = Regex.Match(alph, "c?w.?w");
var strCount = regResult.Value;
var ans = strCount.Count();
Console.WriteLine(ans);
}
}