第一题 import java.util.*; public class Solution { public int solve (int a, int b, int n) { int x=a*b+b; int y=a; int m=0; while(y*m<=n-b){ m++; } return (m-1)*(a)+b; } }