提出 #64278874


ソースコード 拡げる

#include <iostream>
#include <vector>
#include <algorithm>
#include<unordered_map>
#define int long long

using namespace std;


signed main() {
    int n; cin>>n;
    string s, t; cin>>s>>t;
    int ans = 0;

    for(int i = 0;i < n; i++) {
        if(s[i] != t[i]) ans++;
    }

    cout<<ans<<endl;
}

提出情報

提出日時
問題 A - Hamming Distance
ユーザ sivasaran2003
言語 C++ 20 (gcc 12.2)
得点 100
コード長 326 Byte
結果 AC
実行時間 1 ms
メモリ 3668 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 4
AC × 17
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 02_random2_00.txt, 02_random2_01.txt, 02_random2_02.txt, 02_random2_03.txt, 02_random2_04.txt, 02_random2_05.txt, 02_random2_06.txt, 02_random2_07.txt, 03_handmade_00.txt, 03_handmade_01.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3596 KiB
00_sample_01.txt AC 1 ms 3532 KiB
00_sample_02.txt AC 1 ms 3464 KiB
00_sample_03.txt AC 1 ms 3668 KiB
01_random_00.txt AC 1 ms 3512 KiB
01_random_01.txt AC 1 ms 3548 KiB
01_random_02.txt AC 1 ms 3524 KiB
02_random2_00.txt AC 1 ms 3604 KiB
02_random2_01.txt AC 1 ms 3520 KiB
02_random2_02.txt AC 1 ms 3552 KiB
02_random2_03.txt AC 1 ms 3604 KiB
02_random2_04.txt AC 1 ms 3472 KiB
02_random2_05.txt AC 1 ms 3552 KiB
02_random2_06.txt AC 1 ms 3460 KiB
02_random2_07.txt AC 1 ms 3528 KiB
03_handmade_00.txt AC 1 ms 3596 KiB
03_handmade_01.txt AC 1 ms 3596 KiB