Ankit_132

A

Oct 8th, 2023
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     string s;
  8.     cin>>s;
  9.  
  10.     int f = 1;
  11.  
  12.     for(int i=1; i<s.size(); i+=2)
  13.         f &= (s[i] == '0');
  14.  
  15.     if(f)       cout<<"Yes\n";
  16.     else        cout<<"No\n";
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment