0

このコードに存在する大量の if ステートメントを最適化しようとしています。

public class MyClass{
    ArrayList<Stack<String>> positions = new ArrayList<Stack<String>>();

    Stack<String> pos1;
    Stack<String> pos2;
    Stack<String> pos3;
    Stack<String> pos4;
    Stack<String> pos5;
    Stack<String> pos6;
    Stack<String> pos7;
    Stack<String> pos8;
    Stack<String> pos9;
    Stack<String> pos10;
    Stack<String> pos11;
    Stack<String> pos12;
    Stack<String> pos13;
    Stack<String> pos14;
    Stack<String> pos15;
    Stack<String> pos16;
    Stack<String> pos17;
    Stack<String> pos18;
    Stack<String> pos19;
    Stack<String> pos20;
    Stack<String> pos21;
    Stack<String> pos22;
    Stack<String> pos23;
    Stack<String> pos24;
    Stack<String> pos25;
    Stack<String> pos26;
    Stack<String> pos27;

public ClassName{
        for (int i=0; i<28; i++) {
            positions.add(i,new Stack<String>());
        }


}

public void Updater (int position, boolean player){


        if(player){ // if player one is up
            // start position 1 actions
            if(position==1){
                int distance = pos1.size(); 
                if(distance==1){
                    String temp = pos1.peek();
                    if(temp=="x"){ // only make move if player one's chip is on top of the stack
                        pos1.pop();
                        pos2.push(temp);
                    }
                }
                if(distance==2){
                    String temp = pos1.peek();
                    if(temp=="x"){
                        pos1.pop();
                        pos3.push(temp);
                    }
                }
                if(distance==3){
                    String temp = pos1.peek();
                    if(temp=="x"){
                        pos1.pop();
                        pos7.push(temp);
                    }
                }
                if(distance==4){
                    String temp = pos1.peek();
                    if(temp=="x"){
                        pos1.pop();
                        pos8.push(temp);
                    }
                }
                if(distance==5){
                    String temp = pos1.peek();
                    if(temp=="x"){
                        pos1.pop();
                        pos9.push(temp);
                    }
                }
                if(distance==6){
                    String temp = pos1.peek();
                    if(temp=="x"){
                        pos1.pop();
                        pos10.push(temp);
                    }
                }
                if(distance==7){
                    String temp = pos1.peek();
                    if(temp=="x"){
                        pos1.pop();
                        pos11.push(temp);
                    }
                }
                if(distance==8){
                    String temp = pos1.peek();
                    if(temp=="x"){
                        pos1.pop();
                        pos12.push(temp);
                    }
                }
                if(distance==9){
                    String temp = pos1.peek();
                    if(temp=="x"){
                        pos1.pop();
                        pos13.push(temp);
                    }
                }
                if(distance==10){
                    String temp = pos1.peek();
                    if(temp=="x"){
                        pos1.pop();
                        pos14.push(temp);
                    }
                }
                if(distance==11){
                    String temp = pos1.peek();
                    if(temp=="x"){
                        pos1.pop();
                        pos15.push(temp);
                    }
                }
                if(distance==12){
                    String temp = pos1.peek();
                    if(temp=="x"){
                        pos1.pop();
                        pos16.push(temp);
                    }
                }
                if(distance==13){
                    String temp = pos1.peek();
                    if(temp=="x"){
                        pos1.pop();
                        pos16.push(temp);
                    }
                }
                if(distance>13){
                    String temp = pos1.peek();
                    pos1.pop();
                    if(temp=="x"){
                        pos26.push(temp); // push to player one's winners circle
                    }
                }

            }
            // end position 1 actions

            // start position 2 actions
            if(position==2){
                int distance = pos2.size(); 
                if(distance==1){
                    String temp = pos2.peek();
                    if(temp=="x"){
                        pos2.pop();
                        pos3.push(temp);
                    }
                }
                if(distance==2){
                    String temp = pos2.peek();
                    if(temp=="x"){
                        pos2.pop();
                        pos7.push(temp);
                    }
                }               
                if(distance==3){
                    String temp = pos2.peek();
                    if(temp=="x"){ 
                        pos2.pop();
                        pos8.push(temp);
                    }
                }               
                if(distance==4){
                    String temp = pos2.peek();
                    if(temp=="x"){
                        pos2.pop();
                        pos9.push(temp);
                    }
                }           
                if(distance==5){
                    String temp = pos2.peek();
                    if(temp=="x"){
                        pos2.pop();
                        pos10.push(temp);
                    }
                }               
                if(distance==6){
                    String temp = pos2.peek();
                    if(temp=="x"){
                        pos2.pop();
                        pos11.push(temp);
                    }
                }               
                if(distance==7){
                    String temp = pos2.peek();
                    if(temp=="x"){
                        pos2.pop();
                        pos12.push(temp);
                    }
                }           
                if(distance==8){
                    String temp = pos2.peek();
                    if(temp=="x"){ 
                        pos2.pop();
                        pos13.push(temp);
                    }
                }           
                if(distance==8){
                    String temp = pos2.peek();
                    if(temp=="x"){
                        pos2.pop();
                        pos14.push(temp);
                    }
                }
                if(distance==9){
                    String temp = pos2.peek();
                    if(temp=="x"){
                        pos2.pop();
                        pos15.push(temp);
                    }
                }
                if(distance==10){
                    String temp = pos2.peek();
                    if(temp=="x"){ 
                        pos2.pop();
                        pos16.push(temp);
                    }
                }
                if(distance==11){
                    String temp = pos2.peek();
                    if(temp=="x"){ 
                        pos2.pop();
                        pos17.push(temp);
                    }
                }
                if(distance>11){
                    String temp = pos2.peek();
                    pos2.pop();
                    if(temp=="x"){
                        pos26.push(temp); // push to player one's winners circle
                    }
                }

            }
            // end position 2 actions

            // start position 3 actions
            if(position==3){
                int distance = pos3.size(); 
                if(distance==1){
                    String temp = pos3.peek();
                    if(temp=="x"){
                        pos3.pop();
                        pos7.push(temp);
                    }
                }
                if(distance==2){
                    String temp = pos3.peek();
                    if(temp=="x"){
                        pos3.pop();
                        pos8.push(temp);
                    }
                }               
                if(distance==3){
                    String temp = pos3.peek();
                    if(temp=="x"){ 
                        pos3.pop();
                        pos9.push(temp);
                    }
                }               
                if(distance==4){
                    String temp = pos3.peek();
                    if(temp=="x"){
                        pos3.pop();
                        pos10.push(temp);
                    }
                }           
                if(distance==5){
                    String temp = pos3.peek();
                    if(temp=="x"){
                        pos3.pop();
                        pos11.push(temp);
                    }
                }               
                if(distance==6){
                    String temp = pos3.peek();
                    if(temp=="x"){
                        pos3.pop();
                        pos12.push(temp);
                    }
                }               
                if(distance==7){
                    String temp = pos3.peek();
                    if(temp=="x"){
                        pos3.pop();
                        pos13.push(temp);
                    }
                }           
                if(distance==8){
                    String temp = pos3.peek();
                    if(temp=="x"){ 
                        pos3.pop();
                        pos14.push(temp);
                    }
                }           
                if(distance==9){
                    String temp = pos3.peek();
                    if(temp=="x"){
                        pos3.pop();
                        pos15.push(temp);
                    }
                }
                if(distance==10){
                    String temp = pos3.peek();
                    if(temp=="x"){
                        pos3.pop();
                        pos16.push(temp);
                    }
                }
                if(distance==11){
                    String temp = pos3.peek();
                    if(temp=="x"){ 
                        pos3.pop();
                        pos17.push(temp);
                    }
                }
                if(distance>11){
                    String temp = pos3.peek();
                    pos3.pop();
                    if(temp=="x"){
                        pos26.push(temp); // push to player one's winners circle
                    }
                }

            }
            // end position 3 actions

            // start position 7 actions
            if(position==7){
                int distance = pos7.size(); 
                if(distance==1){
                    String temp = pos7.peek();
                    if(temp=="x"){
                        pos7.pop();
                        pos8.push(temp);
                    }
                }
                if(distance==2){
                    String temp = pos7.peek();
                    if(temp=="x"){
                        pos7.pop();
                        pos9.push(temp);
                    }
                }               
                if(distance==3){
                    String temp = pos7.peek();
                    if(temp=="x"){ 
                        pos7.pop();
                        pos10.push(temp);
                    }
                }               
                if(distance==4){
                    String temp = pos7.peek();
                    if(temp=="x"){
                        pos7.pop();
                        pos11.push(temp);
                    }
                }           
                if(distance==5){
                    String temp = pos7.peek();
                    if(temp=="x"){
                        pos7.pop();
                        pos12.push(temp);
                    }
                }               
                if(distance==6){
                    String temp = pos7.peek();
                    if(temp=="x"){
                        pos7.pop();
                        pos13.push(temp);
                    }
                }               
                if(distance==7){
                    String temp = pos7.peek();
                    if(temp=="x"){
                        pos7.pop();
                        pos14.push(temp);
                    }
                }           
                if(distance==8){
                    String temp = pos7.peek();
                    if(temp=="x"){ 
                        pos7.pop();
                        pos15.push(temp);
                    }
                }           
                if(distance==9){
                    String temp = pos7.peek();
                    if(temp=="x"){
                        pos7.pop();
                        pos16.push(temp);
                    }
                }
                if(distance==10){
                    String temp = pos7.peek();
                    if(temp=="x"){
                        pos7.pop();
                        pos17.push(temp);
                    }
                }
                if(distance>10){
                    String temp = pos7.peek();
                    pos7.pop();
                    if(temp=="x"){
                        pos26.push(temp); // push to player one's winners circle
                    }
                }

            }
            // end position 7 actions

            // start position 8 actions
            if(position==8){
                int distance = pos8.size(); 
                if(distance==1){
                    String temp = pos8.peek();
                    if(temp=="x"){
                        pos8.pop();
                        pos9.push(temp);
                    }
                }
                if(distance==2){
                    String temp = pos8.peek();
                    if(temp=="x"){
                        pos8.pop();
                        pos10.push(temp);
                    }
                }               
                if(distance==3){
                    String temp = pos8.peek();
                    if(temp=="x"){ 
                        pos8.pop();
                        pos11.push(temp);
                    }
                }               
                if(distance==4){
                    String temp = pos8.peek();
                    if(temp=="x"){
                        pos8.pop();
                        pos12.push(temp);
                    }
                }           
                if(distance==5){
                    String temp = pos8.peek();
                    if(temp=="x"){
                        pos8.pop();
                        pos13.push(temp);
                    }
                }               
                if(distance==6){
                    String temp = pos8.peek();
                    if(temp=="x"){
                        pos8.pop();
                        pos14.push(temp);
                    }
                }               
                if(distance==7){
                    String temp = pos8.peek();
                    if(temp=="x"){
                        pos8.pop();
                        pos15.push(temp);
                    }
                }           
                if(distance==8){
                    String temp = pos8.peek();
                    if(temp=="x"){ 
                        pos8.pop();
                        pos16.push(temp);
                    }
                }           
                if(distance==9){
                    String temp = pos8.peek();
                    if(temp=="x"){
                        pos8.pop();
                        pos17.push(temp);
                    }
                }
                if(distance>9){
                    String temp = pos8.peek();
                    pos8.pop();
                    if(temp=="x"){
                        pos26.push(temp); // push to player one's winners circle
                    }
                }

            }
            // end position 8 actions

            // start position 9 actions
            if(position==9){
                int distance = pos9.size(); 
                if(distance==1){
                    String temp = pos9.peek();
                    if(temp=="x"){
                        pos9.pop();
                        pos10.push(temp);
                    }
                }
                if(distance==2){
                    String temp = pos9.peek();
                    if(temp=="x"){
                        pos9.pop();
                        pos11.push(temp);
                    }
                }               
                if(distance==3){
                    String temp = pos9.peek();
                    if(temp=="x"){ 
                        pos9.pop();
                        pos12.push(temp);
                    }
                }               
                if(distance==4){
                    String temp = pos9.peek();
                    if(temp=="x"){
                        pos9.pop();
                        pos13.push(temp);
                    }
                }           
                if(distance==5){
                    String temp = pos9.peek();
                    if(temp=="x"){
                        pos9.pop();
                        pos14.push(temp);
                    }
                }               
                if(distance==6){
                    String temp = pos9.peek();
                    if(temp=="x"){
                        pos9.pop();
                        pos15.push(temp);
                    }
                }               
                if(distance==7){
                    String temp = pos9.peek();
                    if(temp=="x"){
                        pos9.pop();
                        pos16.push(temp);
                    }
                }           
                if(distance==8){
                    String temp = pos9.peek();
                    if(temp=="x"){ 
                        pos9.pop();
                        pos17.push(temp);
                    }
                }           
                if(distance>8){
                    String temp = pos9.peek();
                    pos9.pop();
                    if(temp=="x"){
                        pos26.push(temp); // push to player one's winners circle
                    }
                }

            }
            // end position 9 actions

            // start position 10 actions
            if(position==10){
                int distance = pos10.size();    
                if(distance==1){
                    String temp = pos10.peek();
                    if(temp=="x"){
                        pos10.pop();
                        pos11.push(temp);
                    }
                }
                if(distance==2){
                    String temp = pos10.peek();
                    if(temp=="x"){
                        pos10.pop();
                        pos12.push(temp);
                    }
                }               
                if(distance==3){
                    String temp = pos10.peek();
                    if(temp=="x"){ 
                        pos10.pop();
                        pos13.push(temp);
                    }
                }               
                if(distance==4){
                    String temp = pos10.peek();
                    if(temp=="x"){
                        pos10.pop();
                        pos14.push(temp);
                    }
                }           
                if(distance==5){
                    String temp = pos10.peek();
                    if(temp=="x"){
                        pos10.pop();
                        pos15.push(temp);
                    }
                }               
                if(distance==6){
                    String temp = pos10.peek();
                    if(temp=="x"){
                        pos10.pop();
                        pos16.push(temp);
                    }
                }               
                if(distance==7){
                    String temp = pos10.peek();
                    if(temp=="x"){
                        pos10.pop();
                        pos17.push(temp);
                    }
                }                   
                if(distance>7){
                    String temp = pos10.peek();
                    pos10.pop();
                    if(temp=="x"){
                        pos26.push(temp); // push to player one's winners circle
                    }
                }

            }
            // end position 10 actions

            // start position 11 actions
            if(position==11){
                int distance = pos11.size();    
                if(distance==1){
                    String temp = pos11.peek();
                    if(temp=="x"){
                        pos11.pop();
                        pos12.push(temp);
                    }
                }
                if(distance==2){
                    String temp = pos11.peek();
                    if(temp=="x"){
                        pos11.pop();
                        pos13.push(temp);
                    }
                }               
                if(distance==3){
                    String temp = pos11.peek();
                    if(temp=="x"){ 
                        pos11.pop();
                        pos14.push(temp);
                    }
                }               
                if(distance==4){
                    String temp = pos11.peek();
                    if(temp=="x"){
                        pos11.pop();
                        pos15.push(temp);
                    }
                }           
                if(distance==5){
                    String temp = pos11.peek();
                    if(temp=="x"){
                        pos11.pop();
                        pos16.push(temp);
                    }
                }               
                if(distance==6){
                    String temp = pos11.peek();
                    if(temp=="x"){
                        pos11.pop();
                        pos17.push(temp);
                    }
                }                   
                if(distance>6){
                    String temp = pos11.peek();
                    pos11.pop();
                    if(temp=="x"){
                        pos26.push(temp); // push to player one's winners circle
                    }
                }

            }
            // end position 11 actions

            // start position 12 actions
            if(position==12){
                int distance = pos12.size();    
                if(distance==1){
                    String temp = pos12.peek();
                    if(temp=="x"){
                        pos12.pop();
                        pos13.push(temp);
                    }
                }
                if(distance==2){
                    String temp = pos12.peek();
                    if(temp=="x"){
                        pos12.pop();
                        pos14.push(temp);
                    }
                }               
                if(distance==3){
                    String temp = pos12.peek();
                    if(temp=="x"){ 
                        pos12.pop();
                        pos15.push(temp);
                    }
                }               
                if(distance==4){
                    String temp = pos12.peek();
                    if(temp=="x"){
                        pos12.pop();
                        pos16.push(temp);
                    }
                }           
                if(distance==5){
                    String temp = pos12.peek();
                    if(temp=="x"){
                        pos12.pop();
                        pos17.push(temp);
                    }
                }                               
                if(distance>5){
                    String temp = pos12.peek();
                    pos12.pop();
                    if(temp=="x"){
                        pos26.push(temp); // push to player one's winners circle
                    }
                }

            }
            // end position 12 actions

            // start position 13 actions
            if(position==13){
                int distance = pos13.size();    
                if(distance==1){
                    String temp = pos13.peek();
                    if(temp=="x"){
                        pos13.pop();
                        pos14.push(temp);
                    }
                }
                if(distance==2){
                    String temp = pos13.peek();
                    if(temp=="x"){
                        pos13.pop();
                        pos15.push(temp);
                    }
                }               
                if(distance==3){
                    String temp = pos13.peek();
                    if(temp=="x"){ 
                        pos13.pop();
                        pos16.push(temp);
                    }
                }               
                if(distance==4){
                    String temp = pos13.peek();
                    if(temp=="x"){
                        pos13.pop();
                        pos17.push(temp);
                    }
                }                                       
                if(distance>4){
                    String temp = pos13.peek();
                    pos13.pop();
                    if(temp=="x"){
                        pos26.push(temp); // push to player one's winners circle
                    }
                }

            }
            // end position 13 actions

            // start position 14 actions
            if(position==14){
                int distance = pos14.size();    
                if(distance==1){
                    String temp = pos14.peek();
                    if(temp=="x"){
                        pos14.pop();
                        pos15.push(temp);
                    }
                }
                if(distance==2){
                    String temp = pos14.peek();
                    if(temp=="x"){
                        pos14.pop();
                        pos16.push(temp);
                    }
                }               
                if(distance==3){
                    String temp = pos14.peek();
                    if(temp=="x"){ 
                        pos14.pop();
                        pos17.push(temp);
                    }
                }                                                   
                if(distance>3){
                    String temp = pos14.peek();
                    pos14.pop();
                    if(temp=="x"){
                        pos26.push(temp); // push to player one's winners circle
                    }
                }

            }
            // end position 14 actions

            // start position 15 actions
            if(position==15){
                int distance = pos15.size();    
                if(distance==1){
                    String temp = pos15.peek();
                    if(temp=="x"){
                        pos15.pop();
                        pos16.push(temp);
                    }
                }
                if(distance==2){
                    String temp = pos15.peek();
                    if(temp=="x"){
                        pos15.pop();
                        pos17.push(temp);
                    }
                }                                           
                if(distance>2){
                    String temp = pos15.peek();
                    pos15.pop();
                    if(temp=="x"){
                        pos26.push(temp); // push to player one's winners circle
                    }
                }

            }
            // end position 15 actions

            // start position 16 actions
            if(position==15){
                int distance = pos16.size();    
                if(distance==1){
                    String temp = pos16.peek();
                    if(temp=="x"){
                        pos16.pop();
                        pos17.push(temp);
                    }
                }                                   
                if(distance>1){
                    String temp = pos16.peek();
                    pos16.pop();
                    if(temp=="x"){
                        pos26.push(temp); // push to player one's winners circle
                    }
                }

            }
            // end position 16 actions

            // start position 17 actions
            if(position==17){
                int distance = pos17.size();                                    
                if(distance>=1){
                    String temp = pos17.peek();
                    pos17.pop();
                    if(temp=="x"){
                        pos26.push(temp); // push to player one's winners circle
                    }
                }

            }
            // end position 17 actions

            player = false;
            frame.player.setText("Current Player's Turn: Player Two");
        }
}

}

基本的に、x と o のさまざまな文字列を格納する 25 のスタックがあります。updater メソッドは、パラメーターに基づいて、x と o をあるスタックから別のスタックに移動します。各シナリオをカバーするために、ここで行ったのと同じ数の if ステートメントを記述する必要があるでしょうか? 代わりに使用できるループはありますか?

x と o は前方にのみ移動でき、後方には移動できません。

4

6 に答える 6

4

スタックの配列を作成しないのはなぜですか? 次に、if ステートメントを次のように減らすことができます。

Stack[] stacks = new Stack[27];
Arrays.fill(stacks, new Stack<String>);
if (temp.equals("x")) {
   Stack stack = stacks[distance];
   //all other stuff
}
于 2013-04-04T18:42:15.493 に答える
1

ステートメント: は、次のif(distance==1){ ようなものに置き換えることができます:

for(int i= 0 ;i< 13;i++) {
        if(distance==i) {
            // some code
            break; // break the loop once match is found
        }
    }
于 2013-04-04T18:42:20.477 に答える
0

最適化したい場合else ifは、繰り返し発生する if ステートメントの 90% で使用することから始めることができます。そうすれば、すべてではなく、必要なものだけをヒットできます。これにより、バグも減少します。

if(player){ // if player one is up
            // start position 1 actions
            if(position==1){
                int distance = pos1.size(); 
                if(distance==1){
                    String temp = pos1.peek();
                    if(temp.equals("x")){ // only make move if player one's chip is on top of the stack
                        pos1.pop();
                        pos2.push(temp);
                    }
                }
               else if(distance==2){
                    String temp = pos1.peek();
                    if(temp.equals("x")){
                        pos1.pop();
                        pos3.push(temp);
                    }
                }
               else if(distance==3){
                    String temp = pos1.peek();
                    if(temp.equals("x")){
                        pos1.pop();
                        pos7.push(temp);
                    }
                }
                else if(distance==4){
                    String temp = pos1.peek();
                    if(temp.equals("x")){
                        pos1.pop();
                        pos8.push(temp);
                    }
                }
                else if(distance==5){
                    String temp = pos1.peek();
                    if(temp.equals("x")){
                        pos1.pop();
                        pos9.push(temp);
                    }
                }
                else if(distance==6){
                    String temp = pos1.peek();
                    if(temp.equals("x")){
                        pos1.pop();
                        pos10.push(temp);
                    }
                }
                else if(distance==7){
                    String temp = pos1.peek();
                    if(temp.equals("x")){
                        pos1.pop();
                        pos11.push(temp);
                    }
                }
                else if(distance==8){
                    String temp = pos1.peek();
                    if(temp.equals("x")){
                        pos1.pop();
                        pos12.push(temp);
                    }
                }
                else if(distance==9){
                    String temp = pos1.peek();
                    if(temp.equals("x")){
                        pos1.pop();
                        pos13.push(temp);
                    }
                }
                else if(distance==10){
                    String temp = pos1.peek();
                    if(temp.equals("x")){
                        pos1.pop();
                        pos14.push(temp);
                    }
                }
                else if(distance==11){
                    String temp = pos1.peek();
                    if(temp.equals("x")){
                        pos1.pop();
                        pos15.push(temp);
                    }
                }
                else if(distance==12){
                    String temp = pos1.peek();
                    if(temp.equals("x")){
                        pos1.pop();
                        pos16.push(temp);
                    }
                }
                else if(distance==13){
                    String temp = pos1.peek();
                    if(temp.equals("x")){
                        pos1.pop();
                        pos16.push(temp);
                    }
                }
                else if(distance>13){
                    String temp = pos1.peek();
                    pos1.pop();
                    if(temp.equals("x")){
                        pos26.push(temp); // push to player one's winners circle
                    }
                }

            }
            // end position 1 actions
于 2013-04-04T18:41:04.973 に答える
0

ここにいくつかのヒントがあります。

スタックを動的に作成します。

int total = 27
List<Stack<String>> positions = new ArrayList<Stack<String>>();
for (i = 0; i < toal; i++){
   positions.add(new Stack<String>());
}

でアクセスできるようになりましたpositions.get(position);

コードを大幅に簡素化できます。

Stack<String> positionStack = positions.get(position);
int distance = positionStack.size();
if (positionStack.peek().equals("x")){
   positions(nextMove(position).push(positionStack.pop());
}

nextMove(int position)与えられた位置から次の位置を計算する関数です。その機能が何かはわかりませんが、思いつくことができます。

于 2013-04-04T19:08:49.550 に答える
0

あなたがする必要があるいくつかのことがあります:

if if(distance==1){... pos1.pop();then if(distance==2){...pos2.pop();などで多くのことを行っていることに気付いた場合ArrayList<Stack<String>>は、すでに宣言した を使用し、必要なものを取得してください。

if (/* distance is within bounds */)
{
    Stack<String> pos = positions.get(distance);
    ...

tempどの値にプッシュする必要があるかを判断するために、返された値で同様のことを行うことができます。ifこれにより、重複したコードブロックがすべて削除されます。

次に、それぞれのケースで文字列値を==演算子と比較します。演算子は==参照を比較してそれらが同じかどうかを確認しますが、これはおそらくここで必要なものではありません。String#equals値を比較するために使用しStringます。

于 2013-04-04T18:48:12.717 に答える