結果
問題 |
No.1943 消えたAGCT(1)
|
ユーザー |
|
提出日時 | 2023-05-06 19:37:51 |
言語 | C# (.NET 8.0.404) |
結果 |
RE
|
実行時間 | - |
コード長 | 620 bytes |
コンパイル時間 | 11,408 ms |
コンパイル使用メモリ | 170,168 KB |
実行使用メモリ | 193,004 KB |
最終ジャッジ日時 | 2024-11-24 01:29:16 |
合計ジャッジ時間 | 20,801 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 RE * 23 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (97 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().ToList(); var count = 0; var times = 0; while (true) { for (int i = 0; i < n; i++) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') count++; } if (count == 0) break; s.RemoveAt(count - 1); times++; count = 0; } Console.WriteLine(times); } }