/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 2ms 532.0 KiB

Code

#include<bits/stdc++.h>
#include <ctype.h>
using namespace std;
int main()
{
    int p,n,N;
    cin>>N;
    while(N--) {
        string a;
        bool b=false;
        bool l = false;
        bool u = false;
        bool d = false;
        bool s = false;
        cin >> a;
        if(a.size()>=8) {
            for (int i = 0; i < a.size(); i++)
                if (islower(a[i])) {
                    l = true;
                } else if (isupper(a[i])) {
                    u = true;
                } else if (isdigit(a[i])) {
                    d = true;
                } else if (a[i] == '!' || a[i] == '@' || a[i] == '#' || a[i] == '$' || a[i] == '%' || a[i] == '^' || a[i] == '&' || a[i] == '*')
                    s = true;
        }
        if(!l && !u && !d && !s)
            cout<<"invalid"<<endl;
        else
            cout<<"valid"<<endl;


        }}

Information

Submit By
Type
Submission
Problem
P1007 Password Checker
Contest
Beta Round #1
Language
C++17 (G++ 13.2.0)
Submit At
2023-11-29 16:29:05
Judged At
2024-11-11 03:51:02
Judged By
Score
0
Total Time
2ms
Peak Memory
532.0 KiB