結果

問題 No.224 文字列変更(easy)
コンテスト
ユーザー 大谷祐翔
提出日時 2025-11-07 13:17:12
言語 C#
(.NET 8.0.404)
結果
AC  
実行時間 52 ms / 5,000 ms
コード長 773 bytes
コンパイル時間 15,441 ms
コンパイル使用メモリ 170,780 KB
実行使用メモリ 185,628 KB
最終ジャッジ日時 2025-11-07 13:17:30
合計ジャッジ時間 10,978 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (139 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

class Program
{
    static void Main(string[] args)
    {
        string inputLength = Console.ReadLine()!;
        string topWord = Console.ReadLine()!;
        string bottomWord = Console.ReadLine()!;

        List<char> topList = new List<char>();
        List<char> bottomList = new List<char>();

        ListFunc(topList, topWord);
        ListFunc(bottomList, bottomWord);

        int count = 0;
        for (int i = 0; i < topList.Count; i++)
        {
            if (topList[i] != bottomList[i])
            {
                count++;
            }
        }

        Console.WriteLine(count);
    }

    public static void ListFunc(List<char> wordList, string word)
    {
        foreach (char c in word)
        {
            wordList.Add(c);
        }
    }
}
0