Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.108 s | 16 KBi |
#2 |
Correcto
|
0.114 s | 16 KBi |
#3 |
Incorrecto
|
0.11 s | 16 KBi |
#4 |
Incorrecto
|
0.095 s | 16 KBi |
#5 |
Correcto
|
0.115 s | 16 KBi |
#6 |
Correcto
|
0.115 s | 16 KBi |
#7 |
Correcto
|
0.103 s | 16 KBi |
#8 |
Correcto
|
0.099 s | 16 KBi |
#9 |
Correcto
|
0.112 s | 16 KBi |
#10 |
Correcto
|
0.098 s | 16 KBi |
#11 |
Correcto
|
0.103 s | 16 KBi |
#12 |
Correcto
|
0.099 s | 16 KBi |
#13 |
Incorrecto
|
0.107 s | 16 KBi |
#14 |
Correcto
|
0.1 s | 16 KBi |
#15 |
Correcto
|
0.102 s | 16 KBi |
#16 |
Incorrecto
|
0.107 s | 16 KBi |
#17 |
Incorrecto
|
0.11 s | 16 KBi |
#18 |
Correcto
|
0.106 s | 16 KBi |
#19 |
Incorrecto
|
0.101 s | 16 KBi |
#20 |
Correcto
|
0.106 s | 16 KBi |
#21 |
Correcto
|
0.103 s | 16 KBi |
#22 |
Correcto
|
0.097 s | 16 KBi |
#23 |
Correcto
|
0.103 s | 16 KBi |
#24 |
Correcto
|
0.101 s | 16 KBi |
#25 |
Incorrecto
|
0.11 s | 16 KBi |
#26 |
Correcto
|
0.112 s | 16 KBi |
#27 |
Incorrecto
|
0.102 s | 16 KBi |
#28 |
Incorrecto
|
0.108 s | 16 KBi |
#29 |
Incorrecto
|
0.113 s | 16 KBi |
#30 |
Incorrecto
|
0.098 s | 16 KBi |
#31 |
Correcto
|
0.115 s | 16 KBi |
#32 |
Correcto
|
0.114 s | 16 KBi |
#33 |
Incorrecto
|
0.112 s | 16 KBi |
#34 |
Correcto
|
0.118 s | 16 KBi |
#35 |
Correcto
|
0.113 s | 16 KBi |
#36 |
Incorrecto
|
0.111 s | 16 KBi |
import java.util.*; class Main { public static void main(String [] args){ Scanner scanner = new Scanner(System.in); Integer N = scanner.nextInt(); int X = scanner.nextInt(); int Y = scanner.nextInt(); int izquierdo; int derecho; if(Y >= X){ izquierdo = Y - X; derecho = X + (N - Y); } else { izquierdo = (N - X) + Y; derecho = X - Y; } System.out.println("Distancia: " + (izquierdo > derecho) != null ? izquierdo : derecho); } }