Submission details
Task:Lukujono
Sender:JuusoH
Submission time:2025-11-05 21:11:05 +0200
Language:text
Status:READY
Result:21
Feedback
groupverdictscore
#1ACCEPTED21
Test results
testverdicttimescore
#1ACCEPTED0.00 s21details

Code

# Assign big num for loop (1000)
INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A
REPEAT A TIMES (
    REPEAT A TIMES (
        REPEAT A TIMES (
            INCREASE L
        )
    )
)
CLEAR A

# I: bool - is iteration ongoing (hasn't reached 1 and should still iterate)
INCREASE I


REPEAT L TIMES (
    # check: do we keep iterating (is x > 1)
        CLEAR I
        CLEAR A
        REPEAT X TIMES ( 
            # if A is true: set I to true
            REPEAT A TIMES (
                CLEAR I INCREASE I
            )
            # set A to true
            CLEAR A INCREASE A
        )
    REPEAT I TIMES (

        # Print number of the series

        PRINT X

        # calculate halved X to H and find out if X is even in B
            CLEAR H # halved value
            CLEAR A # current iter is uneven
            CLEAR B INCREASE B # current iter is even
            REPEAT X TIMES (
                # increment accumulation H if iteration is even
                    REPEAT A TIMES (
                        INCREASE H
                    )

                # flip A and B
                    REPEAT A TIMES (
                        CLEAR A
                        # INCREASE B
                        INCREASE C
                    )
                    REPEAT B TIMES (
                        CLEAR B
                        INCREASE A
                    )
                    REPEAT C TIMES (
                        INCREASE B
                        CLEAR C
                    )
            )
        # if X is even: move H value to X
            REPEAT B TIMES ( 
                CLEAR X REPEAT H TIMES ( INCREASE X )
            )
        
        # get not of B
            CLEAR F INCREASE F REPEAT B TIMES ( CLEAR F )
        
        # if x not even (F): X+=2X+1
            REPEAT F TIMES (
                REPEAT X TIMES (
                    INCREASE X
                    INCREASE X
                )
                INCREASE X
                # next is guaranteed to be even
                PRINT X
                # calculate halved X to H and find out if X is even in B
                    CLEAR H # halved value
                    CLEAR A # current iter is uneven
                    CLEAR B INCREASE B # current iter is even
                    REPEAT X TIMES (
                        # increment accumulation H if iteration is even
                            REPEAT A TIMES (
                                INCREASE H
                            )

                        # flip A and B
                            REPEAT A TIMES (
                                CLEAR A
                                # INCREASE B
                                INCREASE C
                            )
                            REPEAT B TIMES (
                                CLEAR B
                                INCREASE A
                            )
                            REPEAT C TIMES (
                                INCREASE B
                                CLEAR C
                            )
                    )
                CLEAR X REPEAT H TIMES ( INCREASE X )
            )

    )
)
INCREASE S
PRINT S

Test details

Test 1 (public)

Verdict: ACCEPTED

input
(empty)

correct output
(empty)

user output
# Assign big num for loop (100...

Feedback: 213 tests processed (command limit exceeded)