| Task: | Lukujono |
| Sender: | j-l |
| Submission time: | 2025-11-01 17:39:24 +0200 |
| Language: | text |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| test | verdict | time | score | |
|---|---|---|---|---|
| #1 | WRONG ANSWER | 0.00 s | 0 | details |
Code
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
function lukujono(intOrigin){
while (intOrigin != 1) {
if (intOrigin % 2 == 0) {
intOrigin = intOrigin / 2;
} else {
intOrigin = 3 * intOrigin + 1;
}
console.log(intOrigin);
}
};
rl.question("", (int) => {
lukujono(text);
rl.close();
});