Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <vector>
- #include <algorithm>
- using namespace std;
- /**
- * Auto-generated code below aims at helping you parse
- * the standard input according to the problem statement.
- **/
- bool isSix(long long Number)
- {
- cin >> Number;
- while(Number > 0){
- if(Number%10==6){
- return true;
- }
- else Number=Number/10;
- }
- return false;
- };
- bool isEight(long long Number)
- {
- cin >> Number;
- while(Number > 0){
- if(Number%10==8){
- return true;
- }
- else Number=Number/10;
- }
- };
- bool isLucky()
- {
- if(isEight==true || isSix==true){
- if(isEight==true && isSix==true) return false;
- else return true;
- }
- else return false;
- };
- int main()
- {
- long long L;
- long long R;
- cin >> L >> R; cin.ignore();
- int count = 0;
- for(long long i=L; i++; i<=R){
- if(isLucky==true){
- count++;
- }
- }
- // Write an action using cout. DON'T FORGET THE "<< endl"
- // To debug: cerr << "Debug messages..." << endl;
- cout << "answer " << count << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement