結果
| 問題 | No.224 文字列変更(easy) |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-01-03 17:04:14 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 2,740 bytes |
| 記録 | |
| コンパイル時間 | 3,409 ms |
| コンパイル使用メモリ | 338,748 KB |
| 実行使用メモリ | 7,852 KB |
| 最終ジャッジ日時 | 2026-01-03 17:04:19 |
| 合計ジャッジ時間 | 3,709 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
//Bismillah
#include <bits/stdc++.h>
#define nl cout<<endl;
using namespace std;
#define nl cout<<endl;
#define YN(condition) cout<<(condition?"YES":"NO")
#define yn(condition) cout<<(condition?"Yes":"No")
#define int long long
#define ll long long
#define ld long double
#define pii pair<int,int>
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vpi vector<pair<int,int>>
#define vvi vector<vector<int>>
#define mp map<int,int>
#define uset unordered_set<int>
#define ump unordered_map<int,int>
#define pq priority_queue<int>
#define pqm priority_queue<int, vector<int>, greater<int>>
#define f(i,s,e) for(int i=s;i<e;i++)
#define fn(i,s,e) for(int i=s;i>=e;i++)
#define printv(vec) for(auto &value: vec) cout<<value<<endl;
#define inputv(vec) for(auto &value: vec) cin>>value;
#define pb push_back
#define pp pop_back
#define eb emplace_back
#define all(s) s.begin(), s.end()
#define sa(vec) sort(vec.begin(), vec.end())
#define sd(vec) sort(vec.begin(), vec.end(), [](int a, int b){return a>b;})
#define lambdaPair [](pair<int,int> a, pair<int,int> b)
#define ones(n) __builtin_popcountll(int n);
#define trailingZeros(n) __builtin_ctz(int n);
#define isOn(S, j) (S & (1<<j))
#define setBit(S, j) S |= (1<<j)
#define clearBit(S, j) S &= ~(1<<j)
#define toggleBit(S, j) S ^= (1<<j)
#define lowBit(S) (S & (-S))
#define setAll(S, n) (S = (1<<n)-1)
#define modulo(S, N) ((S) & (N-1))
#define isPowerOfTwo(S) (!(S & (S-1)))
#define nearestPowerOfTwoLess(S) (1<<(int)log2(S))
#define nearestPowerOfTwoMore(S) (1<<((int)log2(S) + 1))
#define turnOffLastBit(S) ((S) &= (S-1))
#define turnOnLastZero(S) ((S) |= (S+1))
#define turnOffLastConsecutiveBits(S) ((S) &= (S+1))
#define turnOnLastConsecutiveZeroes(S) ((S) |= (S-1))
ll gcd(ll a, ll b) { return __gcd(a, b); }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
string to_upper(string a) { for (int i = 0; i < (int)a.size(); ++i) if (a[i] >= 'a' && a[i] <= 'z') a[i] -= 'a' - 'A'; return a; }
string to_lower(string a) { for (int i = 0; i < (int)a.size(); ++i) if (a[i] >= 'A' && a[i] <= 'Z') a[i] += 'a' - 'A'; return a; }
bool prime(ll a) { if (a == 1) return 0; for (int i = 2; i <= round(sqrt(a)); ++i) if (a % i == 0) return 0; return 1; }
ll modexp(ll a, ll b, ll m) { ll res = 1; a %= m; while (b > 0) { if (b & 1) res = (res * a) % m; a = (a * a) % m; b >>= 1; } return res; }
#define fastnuces ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t = 1;
void solve(){
int n;
cin >> n;
string a,b;
int co = 0;
cin >> a >> b;
for(int i = 0; i < n; i++) {
if(a[i] != b[i]) co++;
}
cout << co << endl;
}
signed main() {
fastnuces;
//cin >> t;
while (t--) {
solve();
}
return 0;
}
vjudge1