結果
問題 |
No.2021 Not A but B
|
ユーザー |
|
提出日時 | 2023-05-05 00:53:01 |
言語 | C# (.NET 8.0.404) |
結果 |
TLE
|
実行時間 | - |
コード長 | 526 bytes |
コンパイル時間 | 9,318 ms |
コンパイル使用メモリ | 166,756 KB |
実行使用メモリ | 687,272 KB |
最終ジャッジ日時 | 2024-11-22 14:09:50 |
合計ジャッジ時間 | 67,167 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 8 TLE * 15 MLE * 3 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (96 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.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var S = Console.ReadLine(); var array = S.ToArray(); var hs = new HashSet<string>(); for (int i = 0; i < N - 1; i++) { array[i] = 'B'; array[i + 1] = 'B'; hs.Add(string.Join("", array)); array = S.ToArray(); } Console.WriteLine(hs.Count); } }