結果
| 問題 |
No.345 最小チワワ問題
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-08-11 22:48:20 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 951 bytes |
| コンパイル時間 | 14,662 ms |
| コンパイル使用メモリ | 171,412 KB |
| 実行使用メモリ | 195,384 KB |
| 最終ジャッジ日時 | 2024-09-22 05:32:30 |
| 合計ジャッジ時間 | 15,959 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 RE * 1 |
| other | WA * 21 RE * 8 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (94 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);
}
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
*/