Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <locale.h>
- #include <cmath>
- #include <string.h>
- #include <iostream>
- using namespace std;
- int main()
- {
- int n;
- cin>>n;
- int n1=n;
- n++;
- while(true)
- {
- int k=n;
- while(k)
- {
- if(k%10==8 || k%10==-8) return cout<<n-n1,0; k/=10;
- }
- n++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement