apl-mhd

Mt two

Jun 22nd, 2019
132
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<cstdio>
  2. #include <string>
  3. #include <iostream> //cout, cin
  4. using namespace std;
  5.  
  6. int main() {
  7.  
  8.  
  9.  
  10.     string id;
  11.     cin>>id;
  12.  
  13.     if (!((id[0] <= '9' && id[0] >='0')  || (id[0] <= 'z' && id[0] >= 'a'))) {
  14.  
  15.         cout<< "Not Accept 1";
  16.         exit(0);
  17.     }
  18.     else if (id[1] != '+'){
  19.         cout<< "Not Accept 2";
  20.         exit(0);
  21.  
  22.     } else if(!(id[2] ==  'i' || id[3] == 'i')){
  23.  
  24.  
  25.         cout<< "Not Accept 3";
  26.         exit(0);
  27.  
  28.     } else{
  29.  
  30.         cout<< "Accept";
  31.  
  32.     }
  33.  
  34.  
  35.  
  36.     return 0;
  37. }
RAW Paste Data