Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.044 s | 13 KBi |
#2 |
Correcto
|
0.079 s | 10 KBi |
#3 |
Correcto
|
0.082 s | 10 KBi |
#4 |
Correcto
|
0.05 s | 13 KBi |
#5 |
Correcto
|
0.047 s | 13 KBi |
#6 |
Correcto
|
0.04 s | 14 KBi |
#7 |
Correcto
|
0.051 s | 13 KBi |
#8 |
Correcto
|
0.05 s | 13 KBi |
#9 |
Correcto
|
0.08 s | 10 KBi |
#10 |
Correcto
|
0.079 s | 10 KBi |
#11 |
Correcto
|
0.049 s | 14 KBi |
#12 |
Correcto
|
0.085 s | 10 KBi |
#13 |
Correcto
|
0.039 s | 14 KBi |
#14 |
Correcto
|
0.092 s | 12 KBi |
#15 |
Correcto
|
0.037 s | 14 KBi |
#16 |
Correcto
|
0.074 s | 10 KBi |
#17 |
Correcto
|
0.08 s | 11 KBi |
#18 |
Correcto
|
0.08 s | 10 KBi |
#19 |
Correcto
|
0.048 s | 14 KBi |
#20 |
Correcto
|
0.049 s | 13 KBi |
#21 |
Correcto
|
0.613 s | 14 KBi |
#22 |
Correcto
|
0.05 s | 14 KBi |
#23 |
Correcto
|
0.712 s | 12 KBi |
#24 |
Correcto
|
0.334 s | 14 KBi |
#25 |
Correcto
|
0.851 s | 11 KBi |
#26 |
Correcto
|
0.698 s | 17 KBi |
#27 |
Correcto
|
0.14 s | 14 KBi |
#28 |
Correcto
|
0.367 s | 14 KBi |
#29 |
Correcto
|
0.206 s | 14 KBi |
#30 |
Correcto
|
0.473 s | 14 KBi |
#31 |
Correcto
|
0.215 s | 14 KBi |
#32 |
Correcto
|
0.25 s | 11 KBi |
#33 |
Correcto
|
0.106 s | 14 KBi |
#34 |
Correcto
|
0.637 s | 14 KBi |
#35 |
Correcto
|
0.503 s | 14 KBi |
#36 |
Correcto
|
0.905 s | 11 KBi |
#37 |
Correcto
|
0.343 s | 14 KBi |
import java.io.*; import java.util.StringTokenizer; class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; st = new StringTokenizer(br.readLine()); int n = Integer.parseInt(st.nextToken()); int t = Integer.parseInt(st.nextToken()); int l = Integer.parseInt(st.nextToken()); int clave = 0; boolean dato = true; while(dato){ if(t == l){ dato = false; break; } if(t<n){ if(t!=n-1){ t++; }else{ t=0; } } if(l<n){ if(l==n-2){ l=0; }else if(l==n-1){ l=1; }else{ l+=2; } } clave++; } System.out.print(clave); } }