Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.054 s | 14 KBi |
#2 |
Correcto
|
0.082 s | 50 KBi |
#3 |
Correcto
|
0.057 s | 14 KBi |
#4 |
Correcto
|
0.052 s | 13 KBi |
#5 |
Correcto
|
0.055 s | 13 KBi |
#6 |
Correcto
|
0.075 s | 10 KBi |
#7 |
Correcto
|
0.088 s | 10 KBi |
#8 |
Correcto
|
0.053 s | 13 KBi |
#9 |
Correcto
|
0.051 s | 14 KBi |
#10 |
Correcto
|
0.053 s | 14 KBi |
#11 |
Correcto
|
0.051 s | 13 KBi |
#12 |
Correcto
|
0.097 s | 24 KBi |
#13 |
Correcto
|
0.088 s | 10 KBi |
#14 |
Correcto
|
0.049 s | 13 KBi |
#15 |
Correcto
|
0.051 s | 14 KBi |
#16 |
Correcto
|
0.053 s | 13 KBi |
#17 |
Correcto
|
0.056 s | 13 KBi |
#18 |
Correcto
|
0.079 s | 10 KBi |
#19 |
Correcto
|
0.049 s | 13 KBi |
#20 |
Correcto
|
0.041 s | 14 KBi |
#21 |
Correcto
|
0.053 s | 14 KBi |
#22 |
Correcto
|
0.055 s | 14 KBi |
#23 |
Correcto
|
0.079 s | 10 KBi |
#24 |
Correcto
|
0.045 s | 13 KBi |
#25 |
Correcto
|
0.052 s | 14 KBi |
#26 |
Correcto
|
0.041 s | 14 KBi |
#27 |
Correcto
|
0.052 s | 13 KBi |
#28 |
Correcto
|
0.085 s | 10 KBi |
#29 |
Correcto
|
0.101 s | 33 KBi |
#30 |
Correcto
|
0.052 s | 13 KBi |
#31 |
Correcto
|
0.052 s | 13 KBi |
#32 |
Correcto
|
0.077 s | 10 KBi |
#33 |
Correcto
|
0.053 s | 14 KBi |
#34 |
Correcto
|
0.05 s | 13 KBi |
#35 |
Correcto
|
0.05 s | 14 KBi |
#36 |
Correcto
|
0.083 s | 10 KBi |
import java.io.*; import java.util.StringTokenizer; class Main { public static void main(String[] args) throws IOException{ BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; st = new StringTokenizer(bf.readLine()); long cantidad = Integer.parseInt(st.nextToken()); long x = Integer.parseInt(st.nextToken()); long y = Integer.parseInt(st.nextToken()); long clock,aclock; if(x>=y){ aclock = x-y; }else{ aclock = x+(cantidad-y); } if(y>=x){ clock = y-x; }else{ clock = y+(cantidad-x); } if(clock>aclock){ System.out.println(aclock); }else{ System.out.println(clock); } } }