Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.068 s | 6 KBi |
#2 |
Correcto
|
0.063 s | 6 KBi |
#3 |
Correcto
|
0.059 s | 6 KBi |
#4 |
Correcto
|
0.067 s | 6 KBi |
#5 |
Correcto
|
0.057 s | 8 KBi |
#6 |
Correcto
|
0.059 s | 7 KBi |
#7 |
Correcto
|
0.047 s | 6 KBi |
#8 |
Correcto
|
0.064 s | 6 KBi |
#9 |
Correcto
|
0.062 s | 6 KBi |
#10 |
Correcto
|
0.047 s | 6 KBi |
#11 |
Correcto
|
0.06 s | 6 KBi |
#12 |
Correcto
|
0.054 s | 6 KBi |
#13 |
Correcto
|
0.069 s | 6 KBi |
#14 |
Correcto
|
0.059 s | 6 KBi |
#15 |
Correcto
|
0.059 s | 6 KBi |
#16 |
Correcto
|
0.058 s | 6 KBi |
#17 |
Correcto
|
0.048 s | 6 KBi |
#18 |
Correcto
|
0.049 s | 6 KBi |
#19 |
Correcto
|
0.047 s | 7 KBi |
#20 |
Correcto
|
0.061 s | 6 KBi |
#21 |
Correcto
|
0.051 s | 6 KBi |
#22 |
Correcto
|
0.048 s | 8 KBi |
#23 |
Correcto
|
0.059 s | 6 KBi |
#24 |
Correcto
|
0.062 s | 6 KBi |
#25 |
Correcto
|
0.055 s | 6 KBi |
#26 |
Correcto
|
0.053 s | 6 KBi |
#27 |
Correcto
|
0.068 s | 6 KBi |
#28 |
Correcto
|
0.061 s | 6 KBi |
#29 |
Correcto
|
0.049 s | 6 KBi |
#30 |
Correcto
|
0.051 s | 7 KBi |
#31 |
Correcto
|
0.051 s | 6 KBi |
#32 |
Correcto
|
0.062 s | 6 KBi |
#33 |
Correcto
|
0.064 s | 6 KBi |
#34 |
Correcto
|
0.045 s | 6 KBi |
#35 |
Correcto
|
0.049 s | 6 KBi |
#36 |
Correcto
|
0.052 s | 6 KBi |
process.stdin.on('data', data => { const inputString = data.toString(); const input = inputString.split(' ').map(x => Number(x)); const N = input[0]; const X = input[1]; const Y = input[2]; let position; let clockwise; if (Y >= X) { clockwise = Y - X; } else { clockwise = (N - X) + Y; } let antiClockwise; if (Y <= X) { antiClockwise = X - Y; } else { antiClockwise = X + (N - Y); } console.log(Math.min(clockwise, antiClockwise)); process.exit(); });