結果
| 問題 |
No.345 最小チワワ問題
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-08-11 22:51:30 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 961 bytes |
| コンパイル時間 | 7,529 ms |
| コンパイル使用メモリ | 168,028 KB |
| 実行使用メモリ | 193,096 KB |
| 最終ジャッジ日時 | 2024-09-22 05:35:06 |
| 合計ジャッジ時間 | 12,768 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 RE * 1 |
| other | AC * 7 WA * 14 RE * 8 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (97 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;
class Program
{
static void Main()
{
var inp = Console.ReadLine();
var indexC = inp.IndexOf("c");
var indexW1 = inp.IndexOf("w", indexC);
var indexW2 = inp.IndexOf("w", indexW1 + 1);
//Console.WriteLine(indexC);
//Console.WriteLine(indexW1);
//Console.WriteLine(indexW2);
if (indexC == 0)
{
var extractionString = inp.Substring(indexC, indexW2);
var ans = extractionString.Count();
Console.WriteLine(ans + 1);
}
else
{
var extractionString = inp.Substring(indexC, indexW2 - indexC);
var ans = extractionString.Count();
Console.WriteLine(ans + 1);
}
}
public void CheckStrChiwawa(string chiwawa)
{
}
}
/*
ilovechiwawa
wachiwachi
chiwaaaaaaamikawayadeeeeesu
wcwcwcwcwcwcwcwcwcwcwc
ccwwccw
*/