-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1105.cpp
More file actions
48 lines (35 loc) ยท 731 Bytes
/
1105.cpp
File metadata and controls
48 lines (35 loc) ยท 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// 1105.cpp
// algo
//
// Created by ๋ฐํจ์ on 2021/10/08.
//
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstring>
#include <string>
using namespace std;
int main(){
cin.tie(0);
cout.tie(0);
std::ios::sync_with_stdio(false);
int l,r;
cin>>l>>r;
int cnt=0;
string str_l=to_string(l);
string str_r=to_string(r);
if(str_l.size()!=str_r.size()){
cnt=0;
}else{
for(int i=0;i<str_r.size();i++){
if(str_l[i]==str_r[i]&&str_l[i]=='8'){
cnt++;
}else if(str_l[i]!=str_r[i]){
break;
}
}
}
cout<<cnt<<"\n";
return 0;
}