結果

問題 No.224 文字列変更(easy)
ユーザー inu_hir0shi
提出日時 2015-06-12 22:21:55
言語 C++11
(gcc 4.8.5)
結果
AC  
実行時間 3 ms
コード長 2,065 Byte
コンパイル時間 1,014 ms
使用メモリ 1,536 KB
最終ジャッジ日時 2019-08-25 17:31:24

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
system_test1.txt AC 3 ms
1,532 KB
test_01.in AC 3 ms
1,524 KB
test_02.in AC 3 ms
1,516 KB
test_03.in AC 2 ms
1,524 KB
test_04.in AC 3 ms
1,520 KB
test_05.in AC 3 ms
1,524 KB
test_06.in AC 3 ms
1,524 KB
test_07.in AC 2 ms
1,524 KB
test_08.in AC 3 ms
1,524 KB
test_09.in AC 3 ms
1,528 KB
test_10.in AC 3 ms
1,528 KB
test_11.in AC 3 ms
1,524 KB
test_12.in AC 3 ms
1,524 KB
test_13.in AC 3 ms
1,524 KB
test_14.in AC 3 ms
1,524 KB
test_15.in AC 2 ms
1,524 KB
test_16.in AC 2 ms
1,536 KB
test_17.in AC 3 ms
1,536 KB
test_18.in AC 3 ms
1,536 KB
test_19.in AC 3 ms
1,532 KB
test_20.in AC 2 ms
1,536 KB
テストケース一括ダウンロード

ソースコード

diff #
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> PII;
typedef long long LL;
typedef unsigned long long ULL;
template<class T> inline bool amax (T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool amin (T &a, const T &b) { if (a > b) { a = b; return 1; } return 0; }
template<class T> ostream& operator << (ostream &os, const vector<T> &v) { os << "["; for (typename vector<T>::const_iterator it = v.begin(); it != v.end(); it++) { os << (it != v.begin() ? ", " : "") << *it; } os << "]"; return os; }
template<class T> ostream& operator << (ostream &os, const set<T> &s) { os << "["; for (typename set<T>::const_iterator it = s.begin(); it != s.end(); it++) { os << (it != s.begin() ? ", " : "") << *it; } os << "]"; return os; }
template<class Key, class Val> ostream& operator << (ostream &os, const map<Key, Val> &m) { os << "{"; for (typename map<Key, Val>::const_iterator it = m.begin(); it != m.end(); it++) { os << (it != m.begin() ? ", " : "") << it->first << ":" << it->second; } os << "}"; return os; }
template<class T, class S> ostream& operator << (ostream &os, const pair<T, S> &p) { os << "(" << p.first << ", " << p.second << ")"; return os; }
template <class T> istream& operator >> (istream &is, vector<T> &v) { for (size_t i = 0; i < v.size(); i++) is >> v[i]; return is; }
template <class Target, class Source> inline Target lexical_cast (const Source &s) { Target t; stringstream ss; ss << s; ss >> t; return t; }

//> v < ^ (clock wise)
int dx[] = {1,0,-1,0};
int dy[] = {0,1,0,-1};
const int INFI = 1<<28;
const long long int INFL = 1LL<<60;
const double INFD = 1e+300;
const float INFF = 1e+100;
const double EPS = 1e-8;
const long long int MOD = 1000000007;

int solve ();
int main () {
    cout.setf(ios::fixed); cout.precision(10);
    ios_base::sync_with_stdio(false);
    solve();
    return 0;
}

int solve () {
    int n;
    string s, t;
    cin >> n >> s >> t;
    int a = 0;
    for (int i = 0; i < n; i++) if (s[i] != t[i]) a++;
    cout << a << endl;
    return 0;
}
0