感謝 ss0935565 大大的解釋 看完就懂了
import java.util.Scanner;
public class a215 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
int n = sc.nextInt();
int m = sc.nextInt();
int judge = 1;
int total=n;
while(m>=total) {
total+=(++n);
++judge;
}
System.out.println(judge);
}
}
}