From 351bfe3045af4d8db239f48c67ca3e6a4b6fd9dd Mon Sep 17 00:00:00 2001 From: ShazidMahsrafi Date: Thu, 8 Jun 2023 00:01:28 +0600 Subject: [PATCH] initial commit --- 1792A Gaming Forces/1792A.cpp | 19 +++++++++++++++ 1822 A TubeTube Feed/1822A.cpp | 36 ++++++++++++++++++++++++++++ 411A Password Check/411A.cpp | 34 ++++++++++++++++++++++++++ 977A Wrong Substraction/977A.cpp | 13 ++++++++++ Readme.md | 41 +++++++++++++++++++------------- 5 files changed, 126 insertions(+), 17 deletions(-) create mode 100644 1792A Gaming Forces/1792A.cpp create mode 100644 1822 A TubeTube Feed/1822A.cpp create mode 100644 411A Password Check/411A.cpp create mode 100644 977A Wrong Substraction/977A.cpp diff --git a/1792A Gaming Forces/1792A.cpp b/1792A Gaming Forces/1792A.cpp new file mode 100644 index 0000000..8c22be6 --- /dev/null +++ b/1792A Gaming Forces/1792A.cpp @@ -0,0 +1,19 @@ +#include +using namespace std; +int main() +{ + int t; + cin>>t; + while(t--) + { + int n,num1=0,h; + cin>>n; + for(int i=0;i>h; + if(h==1) + num1++; + } + cout< +using namespace std; +int main(){ + int q; + cin>>q; + while(q--) + { + int n,t; + cin>>n>>t; + int a[n],b[n]; + for(int i=0;i>a[i]; + } + for(int i=0;i>b[i]; + } + int ent=0; + int index=-1; + for(int i=0;ient) + { + ent=b[i]; + index=i+1; + } + } + } + cout< +#include +using namespace std; +int main() +{ + string s; + cin>>s; + int flag1=0,flag2=0,flag3=0; + if(s.length()>=5) + { + for(int i=0;i='A' && s[i]<='Z' && flag1==0) + { + flag1=1; + } + else if(s[i]>='a' && s[i]<='z' && flag2==0) + { + flag2=1; + } + else if(s[i]>='0' && s[i] <='9' && flag3==0) + { + flag3=1; + } + if(flag1==1 && flag2==1 && flag3==1) + break; + } + } + if(s.length()>4 && flag1==1 && flag2==1 && flag3==1) + cout<<"Correct"; + else + cout<<"Too weak"; + return 0; +} \ No newline at end of file diff --git a/977A Wrong Substraction/977A.cpp b/977A Wrong Substraction/977A.cpp new file mode 100644 index 0000000..6214bb8 --- /dev/null +++ b/977A Wrong Substraction/977A.cpp @@ -0,0 +1,13 @@ +#include +using namespace std; +int main() +{ + int n,k; + cin>>n>>k; + while(k--) + { + if(n%10==0) n=n/10; + else n=n-1; + } + cout<