| Task: | Palindromi |
| Sender: | j-l |
| Submission time: | 2025-11-01 15:50:40 +0200 |
| Language: | Node.js |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.11 s | details |
| #2 | WRONG ANSWER | 0.11 s | details |
| #3 | WRONG ANSWER | 0.11 s | details |
| #4 | WRONG ANSWER | 0.11 s | details |
| #5 | WRONG ANSWER | 0.11 s | details |
| #6 | WRONG ANSWER | 0.11 s | details |
| #7 | WRONG ANSWER | 0.11 s | details |
| #8 | WRONG ANSWER | 0.11 s | details |
| #9 | WRONG ANSWER | 0.11 s | details |
| #10 | WRONG ANSWER | 0.11 s | details |
Code
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
function paladromi(wordOrigin){
let txtlength = 0;
let result1 = "";
let result2 = "";
while ((wordOrigin.length/2) > txtlength) {
result1 = result1+wordOrigin.charAt(txtlength);
result2 = wordOrigin.charAt(txtlength)+result2;
txtlength += 1;
}
let final = result1+result2;
return final;
};
rl.question('What is your name? ', (name) => {
console.log(paladromi(name));
rl.close();
});Test details
Test 1 (public)
Verdict: WRONG ANSWER
| input |
|---|
| datatahti |
| correct output |
|---|
| 3 |
| user output |
|---|
| What is your name? datattatad |
Test 2 (public)
Verdict: WRONG ANSWER
| input |
|---|
| saippuakauppias |
| correct output |
|---|
| 0 |
| user output |
|---|
| What is your name? saippuakkau... |
Test 3 (public)
Verdict: WRONG ANSWER
| input |
|---|
| a |
| correct output |
|---|
| 0 |
| user output |
|---|
| What is your name? aa |
Test 4 (public)
Verdict: WRONG ANSWER
| input |
|---|
| aa |
| correct output |
|---|
| 0 |
| user output |
|---|
| What is your name? aa |
Test 5 (public)
Verdict: WRONG ANSWER
| input |
|---|
| abc |
| correct output |
|---|
| 1 |
| user output |
|---|
| What is your name? abba |
Test 6 (public)
Verdict: WRONG ANSWER
| input |
|---|
| aybabtu |
| correct output |
|---|
| 2 |
| user output |
|---|
| What is your name? aybaabya |
Test 7 (public)
Verdict: WRONG ANSWER
| input |
|---|
| abacabaca |
| correct output |
|---|
| 2 |
| user output |
|---|
| What is your name? abacaacaba |
Test 8 (public)
Verdict: WRONG ANSWER
| input |
|---|
| bbbbaaaababbbbbaabaaabaaaaabab... |
| correct output |
|---|
| 23 |
| user output |
|---|
| What is your name? bbbbaaaabab... |
Test 9 (public)
Verdict: WRONG ANSWER
| input |
|---|
| acbaaabaabaddaccdcccbcdbdddacd... |
| correct output |
|---|
| 38 |
| user output |
|---|
| What is your name? acbaaabaaba... |
Test 10 (public)
Verdict: WRONG ANSWER
| input |
|---|
| uaqtmfftecryanvpshxsodjrllqnqp... |
| correct output |
|---|
| 49 |
| user output |
|---|
| What is your name? uaqtmfftecr... |
