摘要:
找规律:n=1 ans=0;n=2 ans=1;n=3 ans=1;.....if( n%2==1 ) ans=ans*2-1;else ans=ans*2+1;View Code 1 import java.util.Scanner; 2 import java.math.*; 3 //import java.text.*; 4 //import java.lang.*; 5 public class b{ 6 public static void main( String srga[] ){ 7 Scanner cin=new Scanner( System.in... 阅读全文