👨‍💻 dev super alg genner jizzer

development

fukurou

the supreme coder
ADMIN
Python:
class EmptyStringTracker:
    def __init__(self, N):
        self.N = N
        self.counter = 0
        self.triggered = False

    def check(self, str1: str) -> bool:
        if str1 == "":
            # Only increment until N
            if self.counter < self.N:
                self.counter += 1
            # Fire once when exactly N empties are reached
            if self.counter == self.N and not self.triggered:
                self.triggered = True
                return True
            return False
        else:
            # Reset on non-empty input
            self.counter = 0
            self.triggered = False
            return False

this will be the standby resetter for input record
@owly
 

the living tribunal

Moderator
Staff member
moderator
Code:
If c more 0 and str.isempty
 C pp, if c is n, c = 0, ret true
If str.notempty c is 1
Ret false
Ejaculation maxin
 
Last edited:

fukurou

the supreme coder
ADMIN
Python:
class TribunalEmptyString:
    def __init__(self, N):
        self.N = N
        self.c = 0

    def check(self, s: str) -> bool:
        # on a row of silence:
        if self.c > 0 and len(s) == 0:
            self.c += 1
            if self.c == self.N:
                self.c = 0
                return True
        if len(s)  > 0
            self.c = 1
        return False
 
Last edited:
Top