結果

問題 No.224 文字列変更(easy)
コンテスト
ユーザー vjudge1
提出日時 2026-01-03 17:12:41
言語 C++23
(gcc 15.2.0 + boost 1.89.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 1,194 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,823 ms
コンパイル使用メモリ 336,188 KB
実行使用メモリ 7,852 KB
最終ジャッジ日時 2026-01-03 17:12:45
合計ジャッジ時間 3,687 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define ld long double
#define nl "\n"
#define vi vector<int>
#define vs vector<string>
#define pii pair<int,int>
#define pb push_back
#define mp make_pair
#define all(a) a.begin(), a.end()
#define allr(vec) vec.rbegin(), vec.rend()
#define mod1 1000000007
#define mod2 998244353
#define sahi(vec) sort(vec.begin(),vec.end())
#define ulta(vec) sort(vec.begin(),vec.end(),greater<typename decltype(vec)::value_type>())
#define fori(a,b) for(int i=a;i<b;i++)
#define forr(a,b) for(int r=a;r>=b;r--)
#define gcd(a,b) __gcd(a,b)
#define popcount(a) __builtin_popcountll(a)
int lcm(int a,int b) {
    return a/gcd(a,b)*b;
}
bool isPowerOfTwo(unsigned int n) {
    return n&&!(n&(n-1));
}
/*
Problem:


Observation:


*/
void solve(){
	int n;
	cin >> n;
	string a,b;
	cin >> a >> b;
	int count=0;
	fori(0,n){
		if(a[i]!=b[i]) count++;
	}
	cout << count << "\n";
}
signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    int t=1;
    //cin >> t;
    while(t--) {
        solve();
    }
    return 0;
}



0