Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.153 s | 17 KBi |
#2 |
Correcto
|
0.137 s | 18 KBi |
#3 |
Correcto
|
0.124 s | 21 KBi |
#4 |
Correcto
|
0.122 s | 14 KBi |
#5 |
Correcto
|
0.14 s | 16 KBi |
#6 |
Correcto
|
0.136 s | 13 KBi |
#7 |
Correcto
|
0.149 s | 13 KBi |
#8 |
Correcto
|
0.148 s | 17 KBi |
#9 |
Correcto
|
0.137 s | 14 KBi |
#10 |
Correcto
|
0.143 s | 15 KBi |
#11 |
Correcto
|
0.124 s | 30 KBi |
#12 |
Correcto
|
0.124 s | 14 KBi |
#13 |
Correcto
|
0.123 s | 16 KBi |
#14 |
Correcto
|
0.127 s | 14 KBi |
#15 |
Correcto
|
0.129 s | 15 KBi |
#16 |
Correcto
|
0.121 s | 15 KBi |
#17 |
Correcto
|
0.127 s | 14 KBi |
#18 |
Correcto
|
0.138 s | 16 KBi |
#19 |
Correcto
|
0.121 s | 15 KBi |
#20 |
Correcto
|
0.146 s | 14 KBi |
#21 |
Correcto
|
0.133 s | 21 KBi |
#22 |
Correcto
|
0.133 s | 28 KBi |
#23 |
Correcto
|
0.133 s | 26 KBi |
#24 |
Correcto
|
0.139 s | 23 KBi |
#25 |
Correcto
|
0.155 s | 16 KBi |
#26 |
Correcto
|
0.215 s | 14 KBi |
#27 |
Correcto
|
0.199 s | 18 KBi |
#28 |
Correcto
|
0.174 s | 12 KBi |
#29 |
Correcto
|
0.159 s | 15 KBi |
#30 |
Correcto
|
0.19 s | 14 KBi |
#31 |
Correcto
|
0.196 s | 30 KBi |
#32 |
Correcto
|
0.204 s | 19 KBi |
#33 |
Correcto
|
0.202 s | 17 KBi |
#34 |
Correcto
|
0.176 s | 16 KBi |
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String inputX = sc.nextLine(); StringBuilder X = new StringBuilder(); X.append(inputX); X.reverse(); int position = 0; int subintX = 0; int size = inputX.length(); do { if (position < size) { subintX = Integer.parseInt(X.substring(position, position + 1)); subintX++; X.replace(position, position + 1, Integer.toString(subintX % 10)); } else { X.append(1); subintX = 0; } position++; } while (subintX > 9); sc.close(); System.out.println(X.reverse()); } }