hanonLegatoScaleRightStaff function

int hanonLegatoScaleRightStaff(
  1. int k
)

A pauta em que a direita escreve a terça k: fá até a 8.ª, sol da 9.ª à 40.ª e fá de novo no fim da descida (1 sol, 2 fá).

Implementation

int hanonLegatoScaleRightStaff(int k) => k <= 8 || k >= 41 ? 2 : 1;