a, b, v가 차례로 주어진다.구하는 값: 달팽이가 총 v를 올라가는데 걸리는 일 수달팽이는 낮에 a만큼을 올라가고 밤에 자면서 b만큼을 미끄러진다.그렇다면 달팽이는 하루가 갈 때 a를 올라간 후에 b만큼 뒤로가니까, 결국 a-b만큼을 올라간다고 볼 수 있다.a-b을
다음과 같이 인덱스가 1부터 시작해서 대각선으로 분수들을 묶는다.이 배열들이 담긴 배열의 인덱스를 n이라고 하자. 예를 들어, n=4인 줄은 1/4가 속한 줄이다.참고로 n번째 줄에 들어있는 분수의 개수는 n개이다.그런데 몇번째 줄인지에 따라서 분수배열의 대각선 방향