Submission details
Task:Lukujono
Sender:rendes
Submission time:2025-11-04 10:44:57 +0200
Language:text
Status:READY
Result:23
Feedback
groupverdictscore
#1ACCEPTED23
Test results
testverdicttimescore
#1ACCEPTED0.00 s23details

Code

#17

PRINT X

INCREASE M 

REPEAT X TIMES ( INCREASE S REPEAT X TIMES ( INCREASE P ) ) # what counts as an operation? 

REPEAT S TIMES ( CLEAR S INCREASE S REPEAT M TIMES ( CLEAR M CLEAR S ) )

INCREASE M
INCREASE M

REPEAT P TIMES (
 REPEAT S TIMES (

 # Is even? and halve anyways
 CLEAR G
 CLEAR B
 CLEAR A
 REPEAT X TIMES (
   INCREASE B
   REPEAT A TIMES (
    CLEAR A
    CLEAR B
   )
   REPEAT B TIMES (
    INCREASE A
    INCREASE G
   )
  )
 CLEAR I
 INCREASE I
 # Was uneven???
 REPEAT B TIMES (
  CLEAR I
  REPEAT X TIMES ( REPEAT M TIMES ( INCREASE X ) )
  INCREASE X
 )

 REPEAT I TIMES (
  PRINT G # if was half print half
  # 1 always comes after 2 so check if we should continue
  CLEAR S
  CLEAR X
  REPEAT G TIMES ( INCREASE X INCREASE S REPEAT I TIMES ( CLEAR S CLEAR I ) ) # Set S=G-1 and X=S
  REPEAT S TIMES ( CLEAR S INCREASE S ) # continue or not if X was 1
 )

 REPEAT B TIMES ( PRINT X ) # was x*3+1 so print

 )
)

Test details

Test 1 (public)

Verdict: ACCEPTED

input
(empty)

correct output
(empty)

user output
#17

PRINT X

INCREASE M 
...

Feedback: 234 tests processed (command limit exceeded)