@@ -0,0 +1,1177 @@
+package AllDemoes;%0A%0Aimport java.util.Scanner;%0A%0A/**%0A * Created by Yogurt on 16/7/6.%0A */%0Apublic class %E5%88%A0%E6%95%B02 %7B%0A    private static boolean%5B%5D book;%0A    private static int%5B%5D ints;%0A    public static void main(String%5B%5D args)%7B%0A        Scanner sc=new Scanner(System.in);%0A%0A        while (sc.hasNextInt())%7B%0A            int n=sc.nextInt();%0A            ints=new int%5Bn%5D;%0A            book=new boolean%5Bn%5D;%0A            for(int i=0;i%3Cn;i++)%7B%0A                ints%5Bi%5D=i;%0A                book%5Bi%5D=false;%0A            %7D%0A            System.out.println(deleteNum(n));%0A        %7D%0A    %7D%0A%0A    private static int deleteNum(int n) %7B%0A        int sum=0;%0A        int index=0;%0A        while (sum%3Cn-1)%7B%0A            if(index%3En-1) index=0;%0A            int dis=0;%0A            while (dis!=3) %7B%0A                if (index%3En-1) index=0;%0A                if (!book%5Bindex%5D)%0A                dis++;%0A                if (dis==3) break;%0A%0A                //System.out.println(dis);%0A                index++;%0A            %7D%0A            //System.out.println(index);%0A            book%5Bindex%5D=true;%0A            index++;%0A            sum++;%0A        %7D%0A        for(int i=0;i%3Cn;i++)%0A            if(!book%5Bi%5D) return i;%0A        return 0;%0A    %7D%0A%0A%7D%0A

solve rhe delete number problem