Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.16 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. #include <algorithm>
  5.  
  6. using namespace std;
  7.  
  8. /**
  9.  * Auto-generated code below aims at helping you parse
  10.  * the standard input according to the problem statement.
  11.  **/
  12.  bool isSix(long long Number)
  13.  {
  14.      cin >> Number;
  15.      while(Number > 0){
  16.      if(Number%10==6){
  17.          return true;
  18.          }
  19.      else Number=Number/10;
  20.      }
  21.      return false;
  22.  };
  23.  
  24.  bool isEight(long long Number)
  25.  {
  26.      cin >> Number;
  27.      while(Number > 0){
  28.      if(Number%10==8){
  29.          return true;
  30.          }
  31.      else Number=Number/10;
  32.      }
  33.  };
  34.  
  35.  bool isLucky()
  36.  {
  37.     if(isEight==true || isSix==true){
  38.         if(isEight==true && isSix==true) return false;
  39.         else return true;
  40.     }
  41.     else return false;
  42.  };
  43.  
  44. int main()
  45. {
  46.     long long L;
  47.     long long R;
  48.     cin >> L >> R; cin.ignore();
  49.     int count = 0;
  50.     for(long long i=L; i++; i<=R){
  51.     if(isLucky==true){
  52.         count++;
  53.         }
  54.     }
  55.    
  56.    
  57.  
  58.     // Write an action using cout. DON'T FORGET THE "<< endl"
  59.     // To debug: cerr << "Debug messages..." << endl;
  60.  
  61.     cout << "answer " << count << endl;
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement