1 solutions
-
0
C++ :
#include<bits/stdc++.h> using namespace std; int t; string ans; int main(){ cin>>t; while(t--){ string s; cin>>s; int len1=s.size(); if(len1<8){ ans+="N"; continue; } int num=0,big=0; bool flag=true; for(int i=0;i<len1;i++){ if(s[i]>='0'&&s[i]<='9'){ num=1; }else if(s[i]>='A'&&s[i]<='Z'){ big=1; }else if(s[i]<'a'||s[i]>'z'){ ans+="N"; flag=false; break; } } if(num+big==2&&flag==true){ ans+="Y"; }else{ ans+="N"; } } int p=ans.size(); for(int i=0;i<p;i++){ cout<<ans[i]<<endl; } return 0; }
- 1
Information
- ID
- 158
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- 10
- Tags
- # Submissions
- 1
- Accepted
- 1
- Uploaded By