Created
September 6, 2019 11:36
-
-
Save surinoel/eed575f19b2b29b4abd8cfae33e5ac35 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <iostream> | |
using namespace std; | |
int main(void) { | |
ios_base::sync_with_stdio(false); | |
cin.tie(nullptr); | |
string a, b; | |
cin >> a >> b; | |
int ans = 0; | |
if (a.length() == b.length()) { | |
for (int i = 0; i < a.length(); i++) { | |
if (a[i] == b[i]) { | |
if (a[i] == '8') { | |
ans += 1; | |
} | |
} | |
else { | |
break; | |
} | |
} | |
} | |
cout << ans << '\n'; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment