buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
#include <bits/stdc++.h> #define int long long #define double long double #define ff first #define ss second #define endl '\n' #define ii pair<int, int> #define mp make_pair #define mt make_tuple #define DESYNC \ ios_base::sync_with_stdio(false); ...
#include <bits/stdc++.h> #define int long long #define double long double #define ff first #define ss second #define endl '\n' #define ii pair<int, int> #define mp make_pair #define mt make_tuple #define DESYNC \ ios_base::sync_with_stdio(false); ...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
293
N = int(input()) print(N + N ^ 2 + N ^ 3)
N = int(input()) print(N + N ** 2 + N ** 3)
[["-", 0, 652, 3, 4, 0, 657, 31, 657, 17, 140], ["+", 3, 4, 0, 657, 31, 657, 12, 657, 17, 578], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 140], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 17, 578]]
5
20
import sys # import re import math import collections # import decimal import bisect import itertools import fractions # import functools import copy # import heapq import decimal # import statistics import queue # import numpy as np sys.setrecursionlimit(10000001) INF = 10 ** 16 MOD = 10 ** 9 + 7 # MOD = 998244353 ...
import sys # import re import math import collections # import decimal import bisect import itertools import fractions # import functools import copy # import heapq import decimal # import statistics import queue # import numpy as np sys.setrecursionlimit(10000001) INF = 10 ** 16 MOD = 10 ** 9 + 7 # MOD = 998244353 ...
[["-", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22]]
5
133
#include <bits/stdc++.h> using namespace std; #define rep(i, ss, ee) for (int i = (ss); i < (ee); ++i) string s, t; void input() { cin >> s >> t; } void solve() { int ans; rep(i, 0, s.size()) { ans += (s[i] != t[i]); } cout << ans << endl; } int main() { ios::sync_with_stdio(false); cin.tie(0); input(); ...
#include <bits/stdc++.h> using namespace std; #define rep(i, ss, ee) for (int i = (ss); i < (ee); ++i) string s, t; void input() { cin >> s >> t; } void solve() { int ans = 0; rep(i, 0, s.size()) ans += (s[i] != t[i]); cout << ans << endl; } int main() { ios::sync_with_stdio(false); cin.tie(0); input(); ...
[["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 9, 0, 45], ["-", 0, 30, 0, 14, 8, 9, 0, 9, 0, 46]]
1
105
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int mycount = 0; for (int i = 1; i < S.size(); i++) { if (S[i] != T[i]) mycount++; } cout << mycount << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int mycount = 0; for (int i = 0; i < S.size(); i++) { if (S[i] != T[i]) mycount++; } cout << mycount << endl; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
72
#include <bits/stdc++.h> #include <iostream> using namespace std; #define ll long long const int mod = 1e9 + 7; const ll INF = 1e14; void solve() { string s1, s2; cin >> s1 >> s2; int count = 0; for (int i = 0; i < s1.length(); ++i) { if (s1[i] == s2[1]) ++count; } cout << ((int)s1.length() ...
#include <bits/stdc++.h> #include <iostream> using namespace std; #define ll long long const int mod = 1e9 + 7; const ll INF = 1e14; void solve() { string s1, s2; cin >> s1 >> s2; int count = 0; for (int i = 0; i < s1.length(); ++i) { if (s1[i] == s2[i]) ++count; } cout << ((int)s1.length() ...
[["-", 15, 339, 51, 16, 12, 69, 341, 342, 0, 13], ["+", 15, 339, 51, 16, 12, 69, 341, 342, 0, 22]]
1
127
#include <bits/stdc++.h> #define rep(i, N) for (int i = 0; i < (N); ++i) #define all(v) v.begin(), v.end() using namespace std; using ll = long long; using P = pair<int, int>; int main(void) { string s, t; cin >> s >> t; int ans = 0; rep(i, s.size()) { if (s.at(i) == t.at(i)) { ans++; } } co...
#include <bits/stdc++.h> #define rep(i, N) for (int i = 0; i < (N); ++i) #define all(v) v.begin(), v.end() using namespace std; using ll = long long; using P = pair<int, int>; int main(void) { string s, t; cin >> s >> t; int ans = 0; rep(i, s.size()) { if (s.at(i) != t.at(i)) { ans++; } } co...
[["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
99
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define RREP(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define ALL(v) v.begin(), v.end() #define RALL(v) v.rbegin(), v.rend() using namespace std; typedef long long ll; int main(void) { string s, t; cin...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define RREP(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define ALL(v) v.begin(), v.end() #define RALL(v) v.rbegin(), v.rend() using namespace std; typedef long long ll; int main(void) { string s, t; cin...
[["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
112
s = input() t = input() x = len(s) num = 0 for i in range(0, x): if s[i] == t[i]: num += 1 print(num)
s = input() t = input() x = len(s) num = 0 for i in range(0, x): if s[i] != t[i]: num += 1 print(num)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79]]
5
47
s = input() t = input() u = 0 if s == t: print(0) else: for i in range(len(s)): if s[i] == t[i]: u += 1 print(u)
s = input() t = input() u = 0 if s == t: print(0) else: for i in range(len(s)): if s[i] != t[i]: u += 1 print(u)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79]]
5
53
S = input() T = input() cout = 0 for i in range(len(S)): if S[i] != T[i]: count = count + 1 print(count)
S = input() T = input() count = 0 for i in range(len(S)): if S[i] != T[i]: count = count + 1 print(count)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]]
5
44
s=input() b=input() c=0 for i in len(s): if s[i]!=b[i]: c=c+1 else: pass print(c)
s=input() b=input() c=0 for i in range(len(s)): if s[i]!=b[i]: c=c+1 else: pass print(c)
[["+", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
44
s = gets.chomp.chars t = gets.chomp.chars num = 0 for i in 1..s.length num = num + 1 if s[i] != t[i] end puts num
s = gets.chomp!.chars t = gets.chomp!.chars num = 0 for i in 0..s.length-1 num = num + 1 if s[i] != t[i] end puts num
[["-", 0, 493, 0, 662, 12, 652, 486, 652, 735, 22], ["+", 0, 493, 0, 662, 12, 652, 486, 652, 735, 22], ["-", 0, 493, 0, 88, 51, 267, 0, 475, 756, 612], ["+", 0, 493, 0, 88, 51, 267, 0, 475, 756, 612], ["+", 0, 88, 51, 267, 0, 475, 444, 738, 17, 33], ["+", 0, 88, 51, 267, 0, 475, 444, 738, 12, 612]]
4
43
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (ll i = 0; i < (ll)n; ++i) const ll INF = 999999999999999; int main() { string s, t; cin >> s >> t; ll ans = 0; rep(i, s.size()) { if (s.at(i) == t.at(i)) ++ans; } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (ll i = 0; i < (ll)n; ++i) const ll INF = 999999999999999; int main() { string s, t; cin >> s >> t; ll ans = 0; rep(i, s.size()) { if (s.at(i) != t.at(i)) ++ans; } cout << ans << endl; return 0; }
[["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
89
#include <iostream> using namespace std; int main() { string a; string b; int s = 0; cin >> a >> b; for (int i = 1; i <= a.size(); i++) { if (a[i] == b[i]) s++; } cout << a.size() - s + 1; return 0; }
#include <iostream> using namespace std; int main() { string a; string b; int s = 0; cin >> a >> b; for (int i = 0; i < a.size(); i++) { if (a[i] == b[i]) s++; } cout << a.size() - s; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 8, 9, 0, 1, 0, 16, 12, 16, 17, 72], ["-", 8, 9, 0, 1, 0, 16, 12, 16, 12, 13]]
1
79
#include <bits/stdc++.h> using namespace std; int main() { string S, T; int ans = 0; cin >> S; cin >> T; for (int i = 0; i < S.size(); i++) { if (S.at(i) == T.at(i)) ans++; } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string S, T; int ans = 0; cin >> S; cin >> T; for (unsigned int i = 0; i < S.size(); i++) { if (S.at(i) != T.at(i)) ans++; } cout << ans << endl; return 0; }
[["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 87], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
78
s = input() t = input() cnt = 0 for i, p in enumerate(range(s)): if p != t[i]: cnt += 1 print(cnt)
s = input() t = input() cnt = 0 for i, p in enumerate(s): if p != t[i]: cnt += 1 print(cnt)
[["-", 0, 7, 12, 652, 3, 4, 0, 652, 63, 22], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
41
Answer = input() input_retu = input() count = 0 for i in range(len(Answer)): if Answer[i] == input_retu[i]: continue else: count += 1
Answer = input() input_retu = input() count = 0 for i in range(len(Answer)): if Answer[i] == input_retu[i]: continue else: count += 1 print(count)
[["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
41
#include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; int n = a.size(), sum = 0; for (int i = 1; i <= n; i++) { if (a[i] != b[i]) { sum++; } } cout << sum << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; int n = a.size(), sum = 0; for (int i = 0; i <= n; i++) { if (a[i] != b[i]) { sum++; } } cout << sum << endl; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
78
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string s, t; cin >> s >> t; int ans = 0; for (int i = 0; i < s.length(); i++) { if (s[i] != s[i]) ans++; } cout << ans << '\n'; }
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string s, t; cin >> s >> t; int ans = 0; for (int i = 0; i < s.length(); i++) { if (s[i] != t[i]) ans++; } cout << ans << '\n'; }
[["-", 0, 57, 15, 339, 51, 16, 12, 69, 28, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 69, 28, 22]]
1
85
#include <bits/stdc++.h> using namespace std; int main() { string s, t; int move = 0; cin >> s >> t; for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) move++; else move = 0; } cout << move << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; int move = 0; cin >> s >> t; for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) move++; } cout << move << endl; return 0; }
[["-", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 0, 57, 75, 76, 0, 1, 0, 11, 31, 22], ["-", 0, 57, 75, 76, 0, 1, 0, 11, 17, 32], ["-", 0, 57, 75, 76, 0, 1, 0, 11, 12, 13], ["-", 8, 9, 0, 57, 75, 76, 0, 1, 0, 35]]
1
77
S = list(input()) T = list(input()) cnt = 0 for t in range(0,int(len(S))-1): if S[t] != T[t]: cnt += 1 print(cnt)
S = list(input()) T = list(input()) cnt = 0 for t in range(0,int(len(S))): if S[t] != T[t]: cnt += 1 print(cnt)
[["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
55
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { string S, T; cin >> S; cin >> T; int count = 0; rep(i, S.size()) { if (S[i] == T[i]) ++count; } cout << count << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { string S, T; cin >> S; cin >> T; int count = 0; rep(i, S.size()) { if (S[i] != T[i]) ++count; } cout << count << endl; return 0; }
[["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
91
#include <iostream> #include <string> using namespace std; int main() { int score = 0; string S1; string S2; cin >> S1, S2; for (int i = 0; i < S1.length(); i++) { if (S1[i] != S2[i]) score++; } cout << score; return 0; }
#include <iostream> #include <string> using namespace std; int main() { int score = 0; string S1; string S2; cin >> S1 >> S2; for (int i = 0; i < S1.length(); i++) { if (S1[i] != S2[i]) score++; } cout << score; return 0; }
[["-", 0, 14, 8, 9, 0, 1, 0, 34, 0, 21], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152]]
1
73
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int ans = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == t[i]) ans++; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int ans = 0; for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) ans++; } cout << ans << endl; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
69
a=input() b=input() c=0 for i in range(len(a)): if a[i]==b[i]: c=c+1 print(c)
a=input() b=input() c=0 for i in range(len(a)): if a[i]==b[i]: c=c+1 print(len(a)-c)
[["+", 0, 652, 3, 4, 0, 657, 31, 652, 63, 22], ["+", 3, 4, 0, 657, 31, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 657, 31, 652, 3, 4, 0, 22], ["+", 3, 4, 0, 657, 31, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33]]
5
44
#include <iostream> using namespace std; int main() { string S, T; int count = 0; cin >> S >> T; int size = S.size(); for (int x = 0; x < size; x++) { if (S.at(x) == T.at(x)) { count++; } } cout << count; }
#include <iostream> using namespace std; int main() { string S, T; int count = 0; cin >> S >> T; int size = S.size(); for (int x = 0; x < size; x++) { if (S.at(x) != T.at(x)) { count++; } } cout << count; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
78
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { string a, c; cin >> a >> c; ll b = a.size(); ll d = 0; for (ll i = 0; i < b; i++) { if (a.at(i) != c.at(i)) d += 0; } cout << d << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { string a, c; cin >> a >> c; ll b = a.size(); ll d = 0; for (ll i = 0; i < b; i++) { if (a.at(i) != c.at(i)) d += 1; } cout << d << endl; }
[["-", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13]]
1
85
s=str(input()) t=str(input()) length=len(s) count=0 for i in range(s): if s[i]==t[i]: pass else: count+=1 print(count)
s=str(input()) t=str(input()) length=len(s) count=0 for i in range(length): if s[i]==t[i]: pass else: count+=1 print(count)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22]]
5
54
#include <cstring> #include <iostream> using namespace std; int main() { int x = 0; int z = 0; char S[200001], T[200001]; cin >> S >> T; for (int i = 0; i < strlen(S); i++) { if (S[i] == T[i]) z++; else x++; } if (z == 0) cout << z; else cout << x; return 0; }
#include <cstring> #include <iostream> using namespace std; int main() { int x = 0; int z = 0; char S[200001], T[200001]; cin >> S >> T; for (int i = 0; i < strlen(S); i++) { if (S[i] == T[i]) z++; else x++; } if (z == 0 && x == 0) cout << z; else cout << x; return 0; }
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
97
#include <stdio.h> int main(void) { char s[200020]; char t[200020]; int i, k = 0; scanf("%s %s", s, t); for (i = 0; i < 200020; i++) { if (s[i] - t[i]) k++; } printf("%d", k); return 0; }
#include <stdio.h> int main(void) { char s[200020]; char t[200020]; int i, k = 0; scanf("%s %s", s, t); for (i = 0; s[i]; i++) { if (s[i] - t[i]) k++; } printf("%d", k); return 0; }
[["+", 0, 14, 8, 9, 0, 7, 15, 69, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 69, 0, 70], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 69, 0, 73]]
0
81
package main import ( "bufio" "fmt" "os" "strconv" ) func nextLine(r *bufio.Reader) string { var buf []byte for { line, isPrefix, err := r.ReadLine() if err != nil { panic(err) } buf = append(buf, line...) if !isPrefix { break } } return string(buf) } func nextStr(s *bufio.Scanner) string {...
package main import ( "bufio" "fmt" "os" "strconv" ) func nextLine(r *bufio.Reader) string { var buf []byte for { line, isPrefix, err := r.ReadLine() if err != nil { panic(err) } buf = append(buf, line...) if !isPrefix { break } } return string(buf) } func nextStr(s *bufio.Scanner) string {...
[["-", 0, 435, 8, 196, 0, 431, 12, 432, 0, 433], ["+", 0, 435, 8, 196, 0, 431, 12, 432, 0, 433]]
7
268
S = input() T = input() count = 0 for (s,t) in map(S,T): if s != t: count += 1 print(count)
S = input() T = input() count = 0 for (s,t) in zip(S,T): if s != t: count += 1 print(count)
[["-", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["+", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22]]
5
39
s = input() t = input() s_len = len(s) count = 0 for i in range(s): if s[i] != t[i]: count += 1 print(count)
s = input() t = input() s_len = len(s) count = 0 for i in range(s_len): if s[i] != t[i]: count += 1 print(count)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22]]
5
45
#include <iostream> #include <string> using namespace std; int main(void) { string S, T; cin >> S >> T; int ans = 0; for (int i = 0; S.size(); i++) { if (S[i] != T[i]) ans++; } cout << ans << endl; }
#include <iostream> #include <string> using namespace std; int main(void) { string S, T; cin >> S >> T; int ans = 0; for (int i = 0; i < S.size(); i++) { if (S[i] != T[i]) ans++; } cout << ans << endl; }
[["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]]
1
70
S = input() T = input() for i in range(len(S)): if(S[i] != T[i]): ans += 1 print(str(ans))
S = input() T = input() ans = 0 for i in range(len(S)): if(S[i] != T[i]): ans += 1 print(str(ans))
[["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]]
5
44
S = list(input()) T = list(input()) print(S, T) c = 0 for i in range(len(S)): if S[i] != T[i]: c += 1 print(c)
S = list(input()) T = list(input()) c = 0 for i in range(len(S)): if S[i] != T[i]: c += 1 print(c)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
54
s = str(input()) t = str(input()) count = 0 for i in len(s): if s[i] != t[i]: count += 1 print(count)
s = str(input()) t = str(input()) count = 0 for i in range(len(s)): if s[i] != t[i]: count += 1 print(count)
[["+", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
45
# B Minor Change S = list(input()) T = list(input()) l=len(S) ct = 0 print(l) for i in range(l): if S[i] != T[i]: ct += 1 print(ct)
# B Minor Change S = list(input()) T = list(input()) l =len(S) ct = 0 for i in range(l): if S[i] != T[i]: ct += 1 print(ct)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
56
import sys s1 = str(input()) s2 = str(input()) ans = 0 for i in range(len(s1)): if s1[i] == s2[i]: ans += 1 print(ans)
import sys s1 = str(input()) s2 = str(input()) ans = 0 for i in range(len(s1)): if s1[i] != s2[i]: ans += 1 print(ans)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79]]
5
50
S = input().strip() T = input().strip() count = 0 for i in len(S): if S[i] == T[i]: count += 1 print(count)
S = input().strip() T = input().strip() count = 0 for i in range(len(S)): if S[i] != T[i]: count += 1 print(count)
[["+", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 25], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79]]
5
47
S = str(input()) T = str(input()) count = 0 for i in range(i, len(S)): if S[i] != T[i]: count+=1 print(count)
S = str(input()) T = str(input()) count = 0 for i in range(0, len(S)): if S[i] != T[i]: count+=1 print(count)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
50
a = input() b = input() ans = 0 for i in range(len(a)): if a[i] == b[i]: ans += 1 print(ans)
a = input() b = input() ans = 0 for i in range(len(a)): if a[i] != b[i]: ans += 1 print(ans)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79]]
5
42
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) int main() { string x; string y; cin >> x; cin >> y; int ans = 0; rep(i, (int)x.size()) { if (x[i] == y[i]) ans++; } cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) int main() { string x; string y; cin >> x; cin >> y; int ans = 0; rep(i, (int)x.size()) { if (x[i] != y[i]) ans++; } cout << ans; return 0; }
[["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
77
#include <stdio.h> #include <stdlib.h> #include <string.h> #define N 2 * 100000 int main(void) { char str[N]; char before[N], after[N]; fgets(str, sizeof(str), stdin); scanf(str, "%s", before); fgets(str, sizeof(str), stdin); scanf(str, "%s", after); int i = 0, counter = 0; while (before[i] != '\0') {...
#include <stdio.h> #include <stdlib.h> #include <string.h> #define N 2 * 1000000 int main(void) { char str[N]; char before[N], after[N]; fgets(str, sizeof(str), stdin); sscanf(str, "%s", before); fgets(str, sizeof(str), stdin); sscanf(str, "%s", after); int i = 0, counter = 0; while (before[i] != '\0'...
[["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22]]
0
144
#include <iostream> using namespace std; int main(void) { string S, T; cin >> S >> T; int ans = 0; for (int i = 0; i < S.size(); i++) { if (S[i] == !T[i]) ans++; } cout << ans << endl; return 0; }
#include <iostream> using namespace std; int main(void) { string S, T; cin >> S >> T; int ans = 0; for (int i = 0; i < S.size(); i++) { if (S[i] != T[i]) ans++; } cout << ans << endl; return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 0, 57, 15, 339, 51, 16, 12, 91, 17, 111], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
74
#include <iostream> using namespace std; int main(void) { // Your code here! string a, b; int c, k = 0; cin >> a >> b; c = a.size(); for (int z = 0; z <= c; z++) { if (a[z] == b[z]) { k++; } } cout << k << endl; }
#include <iostream> using namespace std; int main(void) { // Your code here! string a, b; int c, k = 0; cin >> a >> b; c = a.size(); for (int z = 0; z <= c; z++) { if (a[z] != b[z]) { k++; } } cout << k << endl; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
79
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int cnt; char s[200010]; char t[200010]; fgets(s, sizeof(s), stdin); fgets(t, sizeof(t), stdin); int len = strlen(s); cnt = 0; for (int i = 0; i < len; i++) { if (s[i] != t[i]) { s[i] = t[i]; cnt++; } } print...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int cnt; char s[200010]; char t[200010]; fgets(s, sizeof(s), stdin); fgets(t, sizeof(t), stdin); int len = strlen(s); cnt = 0; for (int i = 0; i < len; i++) { if (s[i] != t[i]) { s[i] = t[i]; cnt++; } } print...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
119
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int n = 0; int i; char buf[2 * 1000000]; char buf2[2 * 1000000]; fgets(buf, sizeof(buf), stdin); fgets(buf2, sizeof(buf2), stdin); i = 0; while (buf[i] != '\0') { i++; } int count = i; for (i = 0; i < count; i++) { ...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int n = 0; int i; char buf[2 * 1000000]; char buf2[2 * 1000000]; fgets(buf, sizeof(buf), stdin); fgets(buf2, sizeof(buf2), stdin); i = 0; while (buf[i] != '\0') { i++; } int count = i; for (i = 0; i < count; i++) { ...
[["-", 8, 9, 0, 57, 15, 23, 0, 11, 17, 32], ["-", 0, 57, 15, 23, 0, 11, 12, 91, 17, 111], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 79]]
0
128
def main(): S = input() T = input() count = 0 for i in len(S): if S[i] != T[i]: count+=1 print(count) if __name__ == '__main__': main()
def main(): S = input() T = input() count = 0 for i in range(len(S)): if S[i] != T[i]: count+=1 print(count) if __name__ == '__main__': main()
[["+", 0, 14, 8, 196, 0, 7, 12, 652, 63, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
54
def b172(slist, tlist): ans = 0 for s, t in slist, tlist: if s != t: ans += 1 return ans def main(): slist = list(str(input())) tlist = list(str(input())) print(b172(slist, tlist)) if __name__ == '__main__': main()
def b172(slist, tlist): ans = 0 for s, t in zip(slist, tlist): if s != t: ans += 1 return ans def main(): slist = list(str(input())) tlist = list(str(input())) print(b172(slist, tlist)) if __name__ == '__main__': main()
[["+", 0, 14, 8, 196, 0, 7, 12, 652, 63, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 25]]
5
76
s = [x for x in input()] t = [y for y in input()] count = 0 for _ in range(len(s)): if s[_] == t[_]: count+=1 print(count)
s = [x for x in input()] t = [y for y in input()] count = 0 for _ in range(len(s)): if s[_] != t[_]: count+=1 print(count)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79]]
5
54
import java.util.*; class Main { public static void main(String[] a) { Scanner c = new Scanner(System.in); String s = c.next(); String t = c.next(); int b = 0; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) == t.charAt(i)) b++; } System.out.println(b); } }
import java.util.*; class Main { public static void main(String[] a) { Scanner c = new Scanner(System.in); String s = c.next(); String t = c.next(); int b = 0; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) != t.charAt(i)) b++; } System.out.println(b); } }
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 60], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 79]]
3
105
#include <iostream> using namespace std; int main() { string a, b; cin >> a; cin >> b; int l = a.length(); int c = 0; for (int i = 0; i < l; i++) { if (a[i] == b[i]) c++; } cout << c; return 0; }
#include <iostream> using namespace std; int main() { string a, b; cin >> a; cin >> b; int l = a.length(); int c = 0; for (int i = 0; i < l; i++) { if (a[i] != b[i]) c++; } cout << c; return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
77
a = input() b = input() r = 0 for i in range(0,len(a)): if a[i] == b[i]: r += 1 print(r)
a = input() b = input() r = 0 for i in range(0,len(a)): if a[i] != b[i]: r += 1 print(r)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79]]
5
44
package main import "fmt" func main() { var a string var b string fmt.Scan(&a) fmt.Scan(&b) var ans int for i := 0; i < len(a); i++ { if a[i] != b[i] { ans++ } } println(ans) }
package main import "fmt" func main() { var a string var b string fmt.Scan(&a) fmt.Scan(&b) var ans int for i := 0; i < len(a); i++ { if a[i] != b[i] { ans++ } } fmt.Println(ans) }
[["-", 0, 435, 8, 196, 0, 1, 0, 2, 63, 22], ["+", 8, 196, 0, 1, 0, 2, 63, 438, 439, 22], ["+", 8, 196, 0, 1, 0, 2, 63, 438, 0, 131], ["+", 8, 196, 0, 1, 0, 2, 63, 438, 119, 120]]
7
81
#include <stdio.h> #include <string.h> int main(void) { int limit = 200000; char str1[limit]; char str2[limit]; scanf("%s", str1); scanf("%s", str2); int i; int count = 0; int length = strlen(str1); int lengthTrue = strlen(str2); if (length == lengthTrue) { for (i = 0; i < length - 1; i++) { ...
#include <stdio.h> #include <string.h> int main(void) { int limit = 200001; char str1[limit]; char str2[limit]; scanf("%s", str1); scanf("%s", str2); int i; int count = 0; int length = strlen(str1); int lengthTrue = strlen(str2); if (length == lengthTrue) { for (i = 0; i < length; i++) { ...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 64, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 64, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
0
122
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String str1 = scan.next(); String str2 = scan.next(); int cnt = 0; for (int i = -1 + str1.length(); i > 0; i--) { if (str1.charAt(i) != str2.charAt(i)) { cn...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String str1 = scan.next(); String str2 = scan.next(); int cnt = 0; for (int i = -1 + str1.length(); i >= 0; i--) { if (str1.charAt(i) != str2.charAt(i)) { c...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 47], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 20]]
3
118
#include <bits/stdc++.h> using namespace std; string s, t; int a; int main() { cin >> s >> t; for (int q = 0; a < t.size(); a++) if (s[q] != t[q]) a++; cout << a; }
#include <bits/stdc++.h> using namespace std; string s, t; int a; int main() { cin >> s >> t; for (int q = 0; q < t.size(); q++) if (s[q] != t[q]) a++; cout << a; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22]]
1
63
S = input() T = input() ans = 0 for i in range(len(s)): if (s[i] != t[i]): ans = ans + 1 print(ans)
s = input() t = input() ans = 0 for i in range(len(s)): if (s[i] != t[i]): ans = ans + 1 print(ans)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]]
5
46
S=gets.chomp T=gets.chomp kekka=0 (0..S.size-1).each do |n| p S[n] kekka+=1 if S[n]!=T[n] end puts kekka
S=gets.chomp T=gets.chomp kekka=0 (0..S.size-1).each do |n| kekka+=1 if S[n]!=T[n] end puts kekka
[["-", 0, 652, 196, 737, 8, 736, 0, 652, 735, 22], ["-", 8, 736, 0, 652, 3, 4, 0, 742, 500, 743], ["-", 8, 736, 0, 652, 3, 4, 0, 742, 0, 70], ["-", 8, 736, 0, 652, 3, 4, 0, 742, 0, 22], ["-", 8, 736, 0, 652, 3, 4, 0, 742, 0, 73]]
4
49
S = input() T = input() cnt = 0 for i in range(len(S)): if S[i] != T[i] : cnt += 1 prrint(cnt)
S = input() T = input() cnt = 0 for i in range(len(S)): if S[i] != T[i] : cnt += 1 print(cnt)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22]]
5
42
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String s = scan.nextLine(); String t = scan.nextLine(); scan.close(); int count = 0; for (int i = 0; i < s.length(); i++) { if (s.substring(i) != t.substring(i))...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String s = scan.nextLine(); String t = scan.nextLine(); scan.close(); int count = 0; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) != t.charAt(i)) { ...
[["-", 0, 57, 15, 15, 0, 16, 31, 492, 141, 22], ["+", 0, 57, 15, 15, 0, 16, 31, 492, 141, 22], ["-", 0, 57, 15, 15, 0, 16, 12, 492, 141, 22], ["+", 0, 57, 15, 15, 0, 16, 12, 492, 141, 22]]
3
114
#include <math.h> #include <stdio.h> #include <string.h> int main() { int m = 0; char s[2000000000]; char t[2000000000]; scanf("%s", s); scanf("%s", t); int n = strlen(s); for (int i = 0; i < n; i++) { if (s[i] != t[i]) { m += 1; } } printf("%d\n", m); return 0; }
#include <math.h> #include <stdio.h> #include <string.h> int main() { int m = 0; char s[2000000]; char t[2000000]; scanf("%s", s); scanf("%s", t); int n = strlen(s); for (int i = 0; i < n; i++) { if (s[i] != t[i]) { m += 1; } } printf("%d\n", m); return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13]]
0
102
#include <iostream> #include <string> using namespace std; int main(void) { string a, b; cin >> a >> b; int k = 0; for (int i = 0; i < a.size(); i++) { if (a[i] == b[i]) { k++; } } cout << k; return 0; }
#include <iostream> #include <string> using namespace std; int main(void) { string a, b; cin >> a >> b; int k = 0; for (int i = 0; i < a.size(); i++) { if (a[i] == b[i]) { k++; } } cout << a.size() - k; return 0; }
[["+", 0, 16, 12, 16, 31, 2, 63, 118, 28, 22], ["+", 0, 16, 12, 16, 31, 2, 63, 118, 17, 131], ["+", 0, 16, 12, 16, 31, 2, 63, 118, 119, 120], ["+", 0, 16, 12, 16, 31, 2, 3, 4, 0, 24], ["+", 0, 16, 12, 16, 31, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 33]]
1
75
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s; cin >> t; long long int n = s.length(), i, c = 0; for (i = 0; i < n; i++) { if (s[i] != t[i]) c++; } cout << t << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s; cin >> t; long long int n = s.length(), i, c = 0; for (i = 0; i < n; i++) { if (s[i] != t[i]) c++; } cout << c << endl; }
[["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
78
s = gets.chomp t = gets.chomp ans = 0 for a in 0..(s.length - 1) do if s[a] == t[a] break else ans += 1 end end puts ans
s = gets.chomp t = gets.chomp ans = 0 for a in 0..(s.length - 1) do if s[a] != t[a] ans += 1 end end puts ans
[["-", 0, 88, 8, 170, 0, 121, 15, 738, 17, 60], ["+", 0, 88, 8, 170, 0, 121, 15, 738, 17, 79], ["-", 8, 170, 0, 121, 64, 749, 0, 94, 0, 94], ["-", 0, 88, 8, 170, 0, 121, 75, 95, 0, 95]]
4
45
s = gets.chomp t = gets.chomp result = 0 s_array = s.split('') t_array = t.split('') s_array.each_with_index do |char, index| result += 1 if char == t_array[index] end puts result
s = gets.chomp t = gets.chomp result = 0 s_array = s.split('') t_array = t.split('') s_array.each_with_index do |char, index| result += 1 if char != t_array[index] end puts result
[["-", 196, 737, 8, 736, 0, 751, 15, 738, 17, 60], ["+", 196, 737, 8, 736, 0, 751, 15, 738, 17, 79]]
4
53
S = input() T = input() j =0 for i in S: if i != T[j]: count +=1 j+=1 print(count)
S = input() T = input() count = 0 j =0 for i in S: if i != T[j]: count +=1 j+=1 print(count)
[["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]]
5
36
#include <bits/stdc++.h> using namespace std; int main() { string S, T; int N; int C = 0; cin >> S >> T; N = S.size(); for (int i = 0; i < N; i++) { if (S.at(i) == T.at(i)) { C++; } } cout << C << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S, T; int N; int C = 0; cin >> S >> T; N = S.size(); for (int i = 0; i < N; i++) { if (S.at(i) != T.at(i)) { C++; } } cout << C << endl; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
82
a = gets.chomp b = gets.chomp u = 0 a.each_with_index do |c, i| u += 1 if c != b[i] end puts u
a = gets.chomp b = gets.chomp u = 0 a.chars.each_with_index do |c, i| u += 1 if c != b[i] end puts u
[["+", 36, 36, 0, 493, 0, 652, 486, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 17, 131]]
4
35
def B(): s = input() t = input() count=0 for i in range(len(s)): if s[i]!=t[i]: count = count+1 print(count) B()
def B(): s = input() t = input() count=0 for i in range(len(s)): if s[i]!=t[i]: count += 1 print(count) B()
[["-", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 17, 107]]
5
52
import sys s = sys.stdin.readline().rstrip() t = sys.stdin.readline().rstrip() count = 0 for i in range(len(s)): if s[i] != s[t]: count += 1 print(count)
import sys s = sys.stdin.readline().rstrip() t = sys.stdin.readline().rstrip() count = 0 for i in range(len(s)): if s[i] != t[i]: count += 1 print(count)
[["-", 8, 196, 0, 57, 15, 666, 0, 206, 51, 22], ["-", 8, 196, 0, 57, 15, 666, 0, 206, 0, 70], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 0, 70], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 206, 22]]
5
60
#pragma GCC optimize("Ofast") #include <stdio.h> int main(void) { char buf1[400001]; gets(buf1); gets(buf1 + 200000); int ans = 0; int i = 200000; do if (buf1[i - 200000] != buf1[i]) ++ans; while (buf1[++i]); printf("%d", ans + 1); return 0; }
#pragma GCC optimize("Ofast") #include <stdio.h> int main(void) { char buf1[400001]; gets(buf1); gets(buf1 + 200000); int ans = 0; int i = 200000; do if (buf1[i - 200000] != buf1[i]) ++ans; while (buf1[++i]); printf("%d", ans); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
0
80
#pragma GCC optimize("Ofast") #include <stdio.h> int main(void) { char buf[400002]; int i = -1; while (1) if (EOF == (buf[++i] = getchar_unlocked())) break; int ans = 0; i >>= 1; char *x = buf + i; while (--i) ans += buf[i] != x[i]; printf("%d", ans); }
#pragma GCC optimize("Ofast") #include <stdio.h> int main(void) { char buf[400002]; int i = 0; while (1) if (EOF == (buf[++i] = getchar_unlocked())) break; int ans = 0; i >>= 1; char *x = buf + i; while (--i) ans += buf[i] != x[i]; printf("%d", ans); }
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
0
87
S = input() T = input() ans = 0 for i, ch in enumerate(S): if ch != T[i]: ans += 1 return ans
S = input() T = input() ans = 0 for i, ch in enumerate(S): if ch != T[i]: ans += 1 print(ans)
[["-", 36, 36, 36, 36, 0, 656, 0, 37, 0, 38], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
36
import java.util.*; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); String s1 = sc.next(); String s2 = sc.next(); int count = 0; for (int i = 0; i < s1.length(); ++i) { if (s1.charAt(i) == s2.charAt(i)) count++; } System.out.p...
import java.util.*; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); String s1 = sc.next(); String s2 = sc.next(); int count = 0; for (int i = 0; i < s1.length(); ++i) { if (s1.charAt(i) != s2.charAt(i)) count++; } System.out.p...
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 60], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 79]]
3
106
ans=0 x,y=input().split() for i in range(len(x)): if x[i] != y[i]: ans=ans+1 print(ans)
ans=0 x=input() y=input() for i in range(len(x)): if x[i] != y[i]: ans=ans+1 print(ans)
[["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21], ["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 0, 131], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]]
5
45
#include <iostream> using namespace std; int main() { string s1, s2; cin >> s1 >> s2; int ans = 0; int n = s1.length(); for (int i = 0; i < n; i++) { if (s1[i] == s2[i]) ans++; } cout << ans << endl; }
#include <iostream> using namespace std; int main() { string s1, s2; cin >> s1 >> s2; int ans = 0; int n = s1.length(); for (int i = 0; i < n; i++) { if (s1[i] != s2[i]) ans++; } cout << ans << endl; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
74
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // int n = sc.nextInt(); String s = sc.next(); String t = sc.next(); // long n = sc.nextLong(); // double n = sc.nextDouble(); int sum = 0; for (int i = 0; i ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // int n = sc.nextInt(); String s = sc.next(); String t = sc.next(); // long n = sc.nextLong(); // double n = sc.nextDouble(); int sum = 0; for (int i = 0; i ...
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 60], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 79]]
3
112
s=input() t=input() sum = 0 for i in range (len(t)): if s(i) != t(i): sum = sum + 1 print(sum)
s=input() t=input() sum = 0 for i in range (len(t)): if s[i] != t[i] : sum = sum + 1 print(sum)
[["-", 0, 57, 15, 666, 0, 652, 3, 4, 0, 24], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 0, 70], ["-", 0, 57, 15, 666, 0, 652, 3, 4, 0, 25], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 0, 73]]
5
44
#include <stdio.h> int main(void) { char a[199999], b[199999]; int cor = 0; scanf("%s %s", a[0], b[0]); for (int i = 0; a[i] != '\0'; i++) { if (a[i] != b[i]) { cor++; } } printf("%d", cor); return 0; }
#include <stdio.h> int main(void) { char a[1999999], b[1999999]; int cor = 0; scanf("%s %s", &a[0], &b[0]); for (int i = 0; a[i] != '\0'; i++) { if (a[i] != b[i]) { cor++; } } printf("%d", cor); return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]]
0
92
S=input() T=input() cout=0 for i in len(S): if S[i]!=T[i]: cout=cout+1 print (cout)
S=input() T=input() cout=0 for i in range(len(S)): if S[i]!=T[i]: cout=cout+1 print (cout)
[["+", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
41
S=input() T=input() aa=0 for s,t in zip(S,T): if s!=t: a+=1 print(a)
S=input() T=input() aa=0 for s,t in zip(S,T): if s!=t: aa+=1 print(aa)
[["-", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]]
5
37
count = 0 a = input() b = input() for i in len(a): if a[i]!=b[i]: count += 1 print(count)
count = 0 a = input() b = input() for i in range(len(a)): if a[i]!=b[i]: count += 1 print(count)
[["+", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
39
#include <bits/stdc++.h> #define debug(x) \ cout << "DEBUG" \ << " " << #x << ":" << x << '\n' #define rep(i, n) \ for (int_...
#include <bits/stdc++.h> #define debug(x) \ cout << "DEBUG" \ << " " << #x << ":" << x << '\n' #define rep(i, n) \ for (int_...
[["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
394
s,t=input().split() u=0 for i in range(0,len(s)): if s[i]!=t[i]: u+=1 print(u)
s=input() t=input() u=0 for i in range(0,len(s)): if s[i]!=t[i]: u+=1 print(u)
[["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21], ["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 0, 131], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]]
5
45
#include <iostream> #include <string> using namespace std; int main() { string a, b; int n = 0; cin >> a; cin >> b; for (int i = 0; i < n; ++i) { if (a[i] != b[i]) { n++; } } cout << n; }
#include <iostream> #include <string> using namespace std; int main() { string a, b; int n = 0; cin >> a; cin >> b; for (int i = 0; i < a.size(); ++i) { if (a[i] != b[i]) { n++; } } cout << n; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 28, 22], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 17, 131], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 119, 120], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 25]]
1
69
s = input() t = input() res = 0 if i in range(s): if s[i] != t[i]: res += 1 print(res)
s = input() t = input() res = 0 for i in range(len(s)): if s[i] != t[i]: res += 1 print(res)
[["-", 36, 36, 36, 36, 0, 656, 0, 57, 0, 121], ["+", 36, 36, 36, 36, 0, 656, 0, 7, 0, 88], ["+", 0, 7, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
39
import sys sys.setrecursionlimit(2147483647) input=sys.stdin.readline def main(): S = input() T = input() count = 0 for i in range(len(S)): if(S[i] != T[i]): count+=1 print(len(T)-count) if __name__=='__main__': main()
import sys sys.setrecursionlimit(2147483647) input=sys.stdin.readline def main(): S = input() T = input() count = 0 for i in range(len(S)): if(S[i] != T[i]): count+=1 print(count) if __name__=='__main__': main()
[["-", 0, 652, 3, 4, 0, 657, 31, 652, 63, 22], ["-", 3, 4, 0, 657, 31, 652, 3, 4, 0, 24], ["-", 3, 4, 0, 657, 31, 652, 3, 4, 0, 22], ["-", 3, 4, 0, 657, 31, 652, 3, 4, 0, 25], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33]]
5
79
$a=fgets(STDIN); $b=fgets(STDIN); $a_array=str_split($a,1); $b_array=str_split($b,1); $result=0; $str_int=strlen($a); for($i=0;$i<=$str_int-1;$i++){ if($a[$i]!==$b[$i]){ $result++; } } echo $result;
<?php $a=fgets(STDIN); $b=fgets(STDIN); $a_array=str_split($a,1); $b_array=str_split($b,1); $result=0; $str_int=strlen($a); for($i=0;$i<=$str_int-1;$i++){ if($a[$i]!==$b[$i]){ $result++; } } echo $result;
[["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 605]]
6
99
s = str(input()) t = str(input()) c = 0 for i in len(s): if(s[i] != t[i]): c+=1 print(c)
s = str(input()) t = str(input()) c = 0 for i in range(len(s)): if(s[i] != t[i]): c+=1 print(c)
[["+", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
47
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespac...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespac...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
161
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() typedef long long ll; #define _GLIBCXX_DEBUG typedef vector<int> vec; typedef vector<ll> lvec; typedef vector<char> cvec; typedef vector<double> dvec;...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() typedef long long ll; #define _GLIBCXX_DEBUG typedef vector<int> vec; typedef vector<ll> lvec; typedef vector<char> cvec; typedef vector<double> dvec;...
[["-", 0, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
163
a=input() b=input() c=len(a) d=0 for i in range(c): if a[i]==b[i]: d=d+1 print(d)
a=input() b=input() c=len(a) d=0 for i in range(c): if a[i]==b[i]: d=d+1 print(c-d)
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33]]
5
47
#include <bits/stdc++.h> using namespace std; using UL = unsigned int; using ULL = unsigned long long; using LL = long long; #define rep(i, n) for (UL i = 0; i < (n); i++) int main() { string S, T; cin >> S >> T; UL ans = 0; rep(i, S.size()) if (S[i] == T[i]) ans++; cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using UL = unsigned int; using ULL = unsigned long long; using LL = long long; #define rep(i, n) for (UL i = 0; i < (n); i++) int main() { string S, T; cin >> S >> T; UL ans = 0; rep(i, S.size()) if (S[i] != T[i]) ans++; cout << ans << endl; return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
90
<?php // 文字列S,T S->T 操作回数の最小値 // Sの1文字を選んで別の文字に書き換える $s = str_split(trim(fgets(STDIN))); $t = str_split(trim(fgets(STDIN))); $counter = 0; for ($i = 0; $i < count($s); $i++) { if ($s[$i] != $t[$i]) { echo $i; $counter++; } } echo $counter;
<?php // 文字列S,T S->T 操作回数の最小値 // Sの1文字を選んで別の文字に書き換える $s = str_split(trim(fgets(STDIN))); $t = str_split(trim(fgets(STDIN))); $counter = 0; for ($i = 0; $i < count($s); $i++) { if ($s[$i] != $t[$i]) { $counter++; } } echo $counter;
[["-", 0, 9, 0, 57, 8, 9, 0, 608, 0, 621], ["-", 0, 57, 8, 9, 0, 608, 0, 606, 0, 607], ["-", 0, 57, 8, 9, 0, 608, 0, 606, 0, 141], ["-", 0, 9, 0, 57, 8, 9, 0, 608, 0, 35]]
6
88
s=input();t=input(); cnt=0 for i in range(len(s)): if s[i]==t[i]: cnt+=1 print(cnt)
s=input();t=input(); cnt=len(s) for i in range(len(s)): if s[i]==t[i]: cnt-=1 print(cnt)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 17, 107], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110]]
5
44
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int count = 0; for (int i = 0; i < (int)S.size(); i++) { if (S[i] == T[i]) count++; } printf("%d\n", count); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int count = 0; for (int i = 0; i < (int)S.size(); i++) { if (S[i] != T[i]) count++; } printf("%d\n", count); return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
79
input1 = input() input2 = input() def match(x, y): i = 0 if x is y: i = 1 return i result_list = map(match, input1, input2) print(result_list.count(0))
input1 = input() input2 = input() def match(x, y): i = 0 if x is y: i = 1 return i result_list = list(map(match, input1, input2)) print(result_list.count(0))
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
50