Advertisement
anhkiet2507

SO MAY MAN

Aug 31st, 2021
2,418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. long long SMM(long long n){
  4.     long long a = n%10;
  5.     long long b = (n/10)%10;
  6.     if(a==6&&b==8){
  7.         return 1;
  8.     }else{
  9.         return 0;
  10.     }
  11. }
  12. using namespace std;
  13. int main() {
  14.     int t;
  15.     cin >> t;
  16.     while(t--){
  17.         long long n;
  18.         cin >> n;
  19.         if(SMM(n)==1){
  20.             cout << 1 << endl;
  21.         }else{
  22.             cout << 0 << endl;
  23.         }
  24.     }
  25.     return 0;
  26. }
  27.  
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement