結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
|
提出日時 | 2025-09-13 22:54:25 |
言語 | C# (.NET 8.0.404) |
結果 |
AC
|
実行時間 | 62 ms / 2,000 ms |
コード長 | 1,124 bytes |
コンパイル時間 | 7,758 ms |
コンパイル使用メモリ | 169,892 KB |
実行使用メモリ | 189,744 KB |
最終ジャッジ日時 | 2025-09-13 22:54:36 |
合計ジャッジ時間 | 11,061 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (103 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static long[] NList => ReadLine().Split().Select(long.Parse).ToArray(); static string[] SList(long n) => Enumerable.Repeat(0, (int)n).Select(_ => ReadLine()).ToArray(); public static void Main() { Solve(); } static void Solve() { var c = NList; var (h, w) = (c[0], c[1]); var s = SList(h); var ans = new char[h][]; for (var i = 0; i < h; ++i) { ans[i] = s[i].ToCharArray(); for (var j = 0; j + 6 <= w; ++j) { if (ans[i][j] == 'y') { ans[i][j + 4] = 'Y'; j += 5; } else if (ans[i][j] == '9') { ans[i][j + 1] = 'Y'; j += 5; } } } WriteLine(string.Join("\n", ans.Select(ai => string.Concat(ai)))); } }