結果
| 問題 | No.725 木は明らかに森である |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-03 10:27:29 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
AC
|
| 実行時間 | 50 ms / 2,000 ms |
| コード長 | 703 bytes |
| 記録 | |
| コンパイル時間 | 7,758 ms |
| コンパイル使用メモリ | 170,596 KB |
| 実行使用メモリ | 185,060 KB |
| 最終ジャッジ日時 | 2025-12-03 10:27:46 |
| 合計ジャッジ時間 | 8,849 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (109 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
class Program
{
static void Main(string[] args)
{
string input = Console.ReadLine()!;
string output = "";
string copy = "";
if (input.Contains("treeone"))
{
foreach (char c in input)
{
copy += c;
output += c;
if (copy.Contains("treeone"))
{
output = output.Remove(output.Length - 7, 7);
copy = copy.Remove(copy.Length - 7, 7);
output += "forest";
}
}
Console.WriteLine(output);
}
else
{
Console.WriteLine(input);
}
}
}