Submission details
Task:Lukujono
Sender:paulajantunen
Submission time:2025-11-08 22:37:44 +0200
Language:text
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttimescore
#10.00 s0details

Code

#include <stdio.h>

int main(void) {
    int X;
    if (scanf("%d", &X) != 1) {
        return 1;
    }

    while (X != 1) {
        printf("%d ", X);
        if (X % 2 == 0) {
            X = X / 2;
        } else {
            X = 3*X + 1;
        }
    }
    printf("1\n");
    return 0;
}

Test details

Test 1 (public)

Verdict:

input
(empty)

correct output
(empty)

user output
#include <stdio.h>

int main(void) {
    int X;
    if (scanf("%d", &X) != 1) ...

Feedback: Error: invalid command int