結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
![]() |
提出日時 | 2025-09-06 15:21:28 |
言語 | C# (.NET 8.0.404) |
結果 |
AC
|
実行時間 | 62 ms / 2,000 ms |
コード長 | 1,742 bytes |
コンパイル時間 | 17,365 ms |
コンパイル使用メモリ | 171,080 KB |
実行使用メモリ | 30,828 KB |
最終ジャッジ日時 | 2025-09-06 15:22:50 |
合計ジャッジ時間 | 12,607 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (146 ミリ秒)。 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.Collections.Generic; using System.Linq; class Program { static string InputPattern = "InputX"; static List<string> GetInputList() { var WillReturn = new List<string>(); if (InputPattern == "Input1") { WillReturn.Add("2 8"); WillReturn.Add("..yiwiy9"); WillReturn.Add("9yiwiy.."); //..yiwiY9 //9Yiwiy.. } else { string wkStr; while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr); } return WillReturn; } static long[] GetSplitArr(string pStr) { return (pStr == "" ? new string[0] : pStr.Split(' ')).Select(pX => long.Parse(pX)).ToArray(); } static void Main() { List<string> InputList = GetInputList(); foreach (string EachStr in InputList.Skip(1)) { int CurrInd = 0; int UB = EachStr.Length - 1; var sb = new System.Text.StringBuilder(); while (CurrInd <= UB) { int RangeSta = CurrInd; if (RangeSta + 5 <= UB) { string SubStr = EachStr.Substring(CurrInd, 6); if (SubStr == "9yiwiy") { sb.Append("9Yiwiy"); CurrInd += 6; continue; } else if (SubStr == "yiwiy9") { sb.Append("yiwiY9"); CurrInd += 6; continue; } } sb.Append(EachStr[CurrInd]); CurrInd++; } Console.WriteLine(sb.ToString()); } } }