Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.057 s | 6 KBi |
#2 |
Incorrecto
|
0.054 s | 6 KBi |
#3 |
Incorrecto
|
0.047 s | 7 KBi |
#4 |
Correcto
|
0.047 s | 6 KBi |
#5 |
Correcto
|
0.083 s | 7 KBi |
#6 |
Correcto
|
0.062 s | 6 KBi |
#7 |
Correcto
|
0.037 s | 6 KBi |
#8 |
Correcto
|
0.052 s | 6 KBi |
#9 |
Correcto
|
0.052 s | 6 KBi |
#10 |
Correcto
|
0.054 s | 6 KBi |
#11 |
Correcto
|
0.058 s | 6 KBi |
#12 |
Correcto
|
0.053 s | 8 KBi |
#13 |
Incorrecto
|
0.049 s | 6 KBi |
#14 |
Incorrecto
|
0.054 s | 9 KBi |
#15 |
Incorrecto
|
0.054 s | 6 KBi |
#16 |
Incorrecto
|
0.047 s | 6 KBi |
#17 |
Incorrecto
|
0.054 s | 6 KBi |
#18 |
Incorrecto
|
0.051 s | 6 KBi |
#19 |
Incorrecto
|
0.055 s | 6 KBi |
#20 |
Incorrecto
|
0.063 s | 6 KBi |
#21 |
Incorrecto
|
0.039 s | 6 KBi |
#22 |
Correcto
|
0.05 s | 6 KBi |
#23 |
Correcto
|
0.05 s | 6 KBi |
#24 |
Correcto
|
0.061 s | 6 KBi |
#25 |
Correcto
|
0.057 s | 6 KBi |
#26 |
Correcto
|
0.063 s | 7 KBi |
#27 |
Correcto
|
0.065 s | 7 KBi |
#28 |
Correcto
|
0.053 s | 7 KBi |
#29 |
Correcto
|
0.085 s | 7 KBi |
#30 |
Correcto
|
0.057 s | 8 KBi |
#31 |
Correcto
|
0.067 s | 7 KBi |
#32 |
Correcto
|
0.066 s | 7 KBi |
#33 |
Correcto
|
0.063 s | 7 KBi |
#34 |
Correcto
|
0.057 s | 7 KBi |
process.stdin.on('data', (input) => { let response; let inputArray = input.toString().split('').map(n => Number(n)); inputArray.pop(); let index = inputArray.length - 1; let current; do { current = inputArray[index] + 1; inputArray[index] = current%10; index--; } while (current > 9 && index >= 0); if (current > 9) { response = [1, ...inputArray].join(''); } else { response = inputArray.join(''); } console.log(response); });