![[Python] 반복문 연습4](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcmRHAv%2FbtsHtQ9wCPT%2FdjkQ0iLY8QewirIb684fxk%2Fimg.png)
Study Code/[Basic] Python2024. 5. 18. 23:46[Python] 반복문 연습4
톱니가 각각 n1개와 n2개의 톱니바퀴가 서로 맞물려 회전할 때, 회전을 시작한 후 처음 맞물린 톱니가 최초로 다시 만나게 될 때까지의 톱니의 수와 각각의 바퀴 회전수를 출력 (단, n2는 n1보다 크다.) > 최소 공배수 문제 gearA_cnt = int(input('GearA 톱니수 입력: '))gearB_cnt = int(input('GearB 톱니수 입력: '))gearA_circle, gearB_circle, num = 0, 0, 0flag = Truewhile flag: if gearA_circle != 0: if gearA_circle != num: gearA_circle += gearA_cnt else: flag = ..