結果

問題 No.224 文字列変更(easy)
ユーザー 14番14番
提出日時 2016-05-04 07:19:07
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,627 bytes
コンパイル時間 873 ms
コンパイル使用メモリ 111,712 KB
実行使用メモリ 27,936 KB
最終ジャッジ日時 2024-04-15 11:12:17
合計ジャッジ時間 2,341 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 24 ms
25,768 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
 
class Program
{
    public void Proc()
    {
        int mojiCount = int.Parse(Reader.ReadLine());
        string str1 = Reader.ReadLine();
        string str2 = Reader.ReadLine();
        
        int ans = 0;
        for(int i=0; i<mojiCount; i++) {
            if(str1[i] != str2[i]) {
                ans++;
            }
        }
        Console.WriteLine(ans);


    }
    

    public class Reader
    {
        public static bool IsDebug = true;
        private static String PlainInput = @"


7
aaabbcc
aabbccc


 
";
        private static System.IO.StringReader Sr = null;
        public static string ReadLine()
        {
            if (IsDebug)
            {
                if (Sr == null)
                {
                    Sr = new System.IO.StringReader(PlainInput.Trim());
                }
                return Sr.ReadLine();
            }
            else
            {
                return Console.ReadLine();
            }
        }
        public static int[] GetInt(char delimiter = ' ', bool trim = false)
        {
            string inptStr = ReadLine();
            if (trim)
            {
                inptStr = inptStr.Trim();
            }
            string[] inpt = inptStr.Split(delimiter);
            int[] ret = new int[inpt.Length];
            for (int i = 0; i < inpt.Length; i++)
            {
                ret[i] = int.Parse(inpt[i]);
            }
            return ret;
        }
    }
    static void Main()
    {
        Program prg = new Program();
        prg.Proc();
    }
}
0