Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.043 s | 7 KBi |
#2 |
Correcto
|
0.033 s | 7 KBi |
#3 |
Correcto
|
0.041 s | 7 KBi |
#4 |
Correcto
|
0.035 s | 7 KBi |
#5 |
Correcto
|
0.066 s | 7 KBi |
#6 |
Correcto
|
0.043 s | 7 KBi |
#7 |
Correcto
|
0.042 s | 7 KBi |
#8 |
Correcto
|
0.041 s | 7 KBi |
#9 |
Correcto
|
0.035 s | 7 KBi |
#10 |
Correcto
|
0.04 s | 7 KBi |
#11 |
Correcto
|
0.075 s | 7 KBi |
#12 |
Correcto
|
0.04 s | 7 KBi |
#13 |
Correcto
|
0.047 s | 7 KBi |
#14 |
Correcto
|
0.039 s | 7 KBi |
#15 |
Correcto
|
0.037 s | 7 KBi |
#16 |
Correcto
|
0.038 s | 7 KBi |
#17 |
Correcto
|
0.046 s | 7 KBi |
#18 |
Correcto
|
0.044 s | 7 KBi |
#19 |
Correcto
|
0.038 s | 7 KBi |
#20 |
Correcto
|
0.042 s | 7 KBi |
#21 |
Correcto
|
0.037 s | 7 KBi |
#22 |
Correcto
|
0.047 s | 7 KBi |
#23 |
Correcto
|
0.052 s | 7 KBi |
#24 |
Correcto
|
0.039 s | 7 KBi |
#25 |
Correcto
|
0.038 s | 7 KBi |
#26 |
Correcto
|
0.069 s | 7 KBi |
#27 |
Correcto
|
0.037 s | 7 KBi |
#28 |
Correcto
|
0.038 s | 7 KBi |
#29 |
Correcto
|
0.061 s | 7 KBi |
#30 |
Correcto
|
0.04 s | 7 KBi |
#31 |
Correcto
|
0.038 s | 7 KBi |
#32 |
Correcto
|
0.038 s | 7 KBi |
#33 |
Correcto
|
0.039 s | 7 KBi |
#34 |
Correcto
|
0.038 s | 7 KBi |
#35 |
Correcto
|
0.043 s | 7 KBi |
#36 |
Correcto
|
0.045 s | 7 KBi |
let readline = require("readline"); process.stdin.setEncoding("utf8"); let stdin = readline.createInterface({ input: process.stdin, terminal: false, }); stdin.on("line", readLine); function readLine(line) { let input = line.split(" "); let circleLength = Number(input[0]); let position = Number(input[1]); let goal = Number(input[2]); let rightWay = Math.abs(position - goal) let leftWay = circleLength - rightWay console.log(Math.min(rightWay, leftWay)) }