Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##
- function is_password_good(password: string): boolean;
- begin
- var (cnt,sum_совпадений) := (0,0);
- if (Length(password) >= 8) then cnt += 1;
- if (password <> password.ToUpper) then cnt += 1;
- if (password <> password.ToLower) then cnt += 1;
- for var i := 1 to Length(password) do
- if password[i] in '0123456789' then sum_совпадений += 1;
- if sum_совпадений >= 1 then cnt += 1;
- if (cnt = 4) then Result:= true else Result:= false;
- end;
- //
- var txt := ReadString;
- Print(is_password_good(txt))
Advertisement
Add Comment
Please, Sign In to add comment