結果

問題 No.224 文字列変更(easy)
コンテスト
ユーザー 大谷祐翔
提出日時 2025-11-07 13:17:12
言語 C#
(.NET 10.0.201)
コンパイル:
dotnet_c
実行:
/usr/bin/dotnet_wrap
結果
AC  
実行時間 69 ms / 5,000 ms
+ 44µs
コード長 773 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 5,059 ms
コンパイル使用メモリ 172,240 KB
実行使用メモリ 190,960 KB
最終ジャッジ日時 2026-07-16 08:51:32
合計ジャッジ時間 7,093 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (92 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net10.0/main.dll
  main -> /home/judge/data/code/bin/Release/net10.0/publish/

ソースコード

diff #
raw source code

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