結果
| 問題 | 
                            No.224 文字列変更(easy)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             aketijyuuzou
                         | 
                    
| 提出日時 | 2024-10-10 23:40:29 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 24 ms / 5,000 ms | 
| コード長 | 1,489 bytes | 
| コンパイル時間 | 1,046 ms | 
| コンパイル使用メモリ | 114,576 KB | 
| 実行使用メモリ | 25,780 KB | 
| 最終ジャッジ日時 | 2024-10-10 23:40:31 | 
| 合計ジャッジ時間 | 2,280 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 22 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
class Program
{
    static string InputPattern = "InputX";
    static List<string> GetInputList()
    {
        var WillReturn = new List<string>();
        if (InputPattern == "Input1") {
            WillReturn.Add("7");
            WillReturn.Add("aaabbcc");
            WillReturn.Add("aabbccc");
            //2
            //まず、3文字目を'a' -> 'b'と変更すると、
            //aaabbcc -> aabbbcc
            //次に、6文字目を'b' -> 'c'と変更すると、
            //aabbbcc -> aabbccc
        }
        else if (InputPattern == "Input2") {
            WillReturn.Add("5");
            WillReturn.Add("abcde");
            WillReturn.Add("abcde");
            //0
            //操作を行う必要がないため、0を出力します。
        }
        else if (InputPattern == "Input3") {
            WillReturn.Add("8");
            WillReturn.Add("hidamari");
            WillReturn.Add("yunocchi");
            //7
        }
        else {
            string wkStr;
            while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr);
        }
        return WillReturn;
    }
    static void Main()
    {
        List<string> InputList = GetInputList();
        string S = InputList[1];
        string T = InputList[2];
        int Cost = 0;
        for (int I = 0; I <= S.Length - 1; I++) {
            if (S[I] != T[I]) Cost++;
        }
        Console.WriteLine(Cost);
    }
}
            
            
            
        
            
aketijyuuzou