1.8颗石头称量问题public class Practice public static void main(String args) Sky();public static void Sky()int Weight=new int 10,10,10,10,10,10,10,12;/石头的重量int Stone=new int 8;/用来装石头的容器int Random=new int 8;int t,i;for(i=0;i8;i+)Randomi=(int)(Math.random()*8);for(int j=0;ji;j+)if(Randomi=Randomj)i-;System.out.println(第一次称量,选六颗石头);for(i=0;i8;i+)/往容器里填装随机抽取的石头