鏈?7涓漢鍥存垚涓鍦?緙栧彿0~16),浠庣0鍙風殑浜哄紑濮嬩粠1鎶ユ暟錛屽嚒鎶ュ埌3鐨勫嶆暟鐨勪漢紱誨紑鍦堝瓙錛?br />
鐒跺悗鍐嶆暟涓嬪幓錛岀洿鍒版渶鍚庡彧鍓╀笅涓涓漢涓烘錛岄棶姝や漢鍘熸潵鐨勪綅緗槸澶氬皯鍙?
int [] people = new int[17];
int lastPeople = 0;
public void getTheLastPeople(){
for(int i = 0; i < people.length; i++){
people[i] = i+1;
}
int count = 0;
int countLast = 0;
int j = 0;
while(true){
for(j = 0; j < people.length; j++){
if(people[j] != 0){
count++;
people[j] = count;
System.out.println("people[" + j + "] = " + people[j]);
if (people[j] % 3 == 0) {
people[j] = 0;
countLast++;
if(countLast == 17){
lastPeople = j;
return;
}
}
}
}
}
}

]]>