herrDeng網內搜尋

自訂搜尋

Ads

2010年11月1日 星期一

GCD(10^10+1, 10^11+2)=?

GCD(10^10+1, 10^11+2)=?

55 則留言:

B9833066 提到...
網誌管理員已經移除這則留言。
B9833115 提到...


public class B9833115 {
  static  long gcd (long x, long y)
  
    {
      long  r=x%y;
      if (r==0)return y;
           else
            return gcd (y,r);
    }
    public static void main(String arg[])
    {
    long x=10000000001L;
    long y=100000000002L;
        long a=gcd(x,y);
          
            System.out.println(gcd(x,y));
    }
}

B9833064 提到...

/**
 * @(#)sweet.java
 *
 *
 * @author
 * @version 1.00 2010/11/1
 */

public class sweet
{
   static long gcd(long x,long y)
      {
      long r=x%y;
      if(r==0)
         return y;
      else
         return gcd(y,r);
      }
    static public void main(String gcd[])
    {
      long x=10^10+1;
      long y=10^11+2;
      System.out.print("gcd最大公因數:"+gcd(x,y));
    }      
}

b9833070 提到...

public class david {
   static long asd(long x ,long y)
   {
      long r=x%y;
      if (r==0) return y;
      else
         return asd(y,r);
   }
   static public void main(String arg[])
   {
   long x=10000000001L;
   long y=100000000002L;
   System.out.println(asd(x,y));

b9833103 提到...

public class b9833103 {
    static  long gcd (long x, long y)
  
    {
     long r=x%y;
      if (r==0)return y;
           else
            return gcd (y,r);
    }
    public static void main(String arg[])
    {
      long x=10000000001L;
      long y=1000000000002L;
         long a=gcd(x,y);
          
            System.out.println(gcd(x,y));
    }
}

B9833092 提到...

/**
 * @(#)jave1101.java
 *
 *
 * @author
 * @version 1.00 2010/11/1
 */

public class jave1101 {
  static long GCD(long x,long y){
      long r=x%y;
      if(r==0)
         return y;
      else
         return GCD(y,r);
  }
    public static void main(String[] args){
      System.out.println("考前練習--GCD(10^10+1, 10^11+2)=?\n");
      long A=10;
      for(int i=0;i<9;i++)
         A*=10;
      A+=1;
      long B=10;
      for(int i=0;i<10;i++)
         B*=10;
      B+=2;
      System.out.println("A="+A+".B="+B+"\n");
      long Q=GCD(B,A);
      System.out.println("\n\t答案--GCD(10^10+1, 10^11+2)="+Q);
    }
}

b9833107 提到...

public class b9833107 {
 static  long gcd (long x, long y)
  
    {
      long r=x%y;
      if (r==0)return y;
           else
            return gcd (y,r);
    }
    public static void main(String arg[])
    {
      long x=10000000001L;
      long y=100000000002L;
         long a=gcd(x,y);
          
            System.out.println(gcd(x,y));
    }

B9833071 提到...

public class b123 {
     static long gcd(long x ,long y)
       {
    long r = x%y;
    if(r==0)return y;
  &
nbsp; else
      return gcd(y,r);
    }
   
    public static void main(String[] args)
    {
      long x=10000000001L;
      long y=100000000002L;
      long a=gcd(x,y);
      System.out.println(gcd(x,y));
     
    }
   
}

B9833115 提到...


public class B9833115 {
  static  long gcd (long x, long y)
  
    {
      long  r=x%y;
      if (r==0)return y;
           else
            return gcd (y,r);
    }
    public static void main(String arg[])
    {
    long x=10000000001L;
    long y=100000000002L;
        long a=gcd(x,y);
          
            System.out.println(gcd(x,y));
    }
}

B9833082 提到...

/**
 * @(#)aaa.java
 *
 *
 * @author
 * @version 1.00 2010/11/1
 */

public class aaa {
  
static long gcd (long x,long y)
{
   long r = x % y;
   if (r==0)return y;
   else
      return gcd (y,r);
}   
public static void main(String[] args)
{
   long x=10000000001L;
   long y=100000000002L;
   long a=gcd(x,y);
  
   System.out.println(gcd(x,y));
     
}

 
 
 
--------------------Configuration: <Default>--------------------
1
Process completed.

B9833079 提到...

public class a {
 static long gcd(long x,long y)
 {
   long i = x%y;
   if(i==0)return y;
   else
      return gcd(y,i);
     
 }
    public static void main(String[] args)
    {
      long x=10000000001L;
      long y=100000000002L;
      long a=gcd(x,y);
      System.out.println(gcd(x,y));
    }
   
}
--------------------------------------
1
Process completed.

B9833077 提到...

public class GCD {
static long gcd(long x,long y)
{
   long r = x % y;
   if (r==0) return y;
   else
      return gcd (y,r);
}  
   public static void main (String[] args)
   {
      long x = 10000000001L;
      long y = 100000000002L;
      long a = gcd(x,y);
     
      System.out.println(gcd(x,y));
   }
   
}

B9833083 提到...

public class GCD {
  
   static long gcd (long x, long y)
   {
         long r = x % y;
        
         if(r == 0) return y;
        
         else
           
         return gcd(y,r);   
     
     
      }
    public static void main (String argv[])
      {
         long x = 10000000001L ;
        
         long y = 100000000002L;
        
        long a = gcd(x,y);
        
         System.out.println(gcd(x,y));   
        
    }  
   
}

B9833070 提到...

public class david {
   static long david(long x ,long y)
   {
      long r=x%y;
      if (r==0) return y;
      else
         return david(y,r);
   }
   static public void main(String arg[])
   {
   long x=10000000001L;
   long y=100000000002L;
   System.out.println(david(x,y));
   } 
}

b9833103 提到...

public class b9833103 {
    static  long gcd (long x, long y)
  
    {
     long r=x%y;
      if (r==0)return y;
           else
            return gcd (y,r);
    }
    public static void main(String arg[])
    {
      long x=10000000001L;
      long y=1000000000002L;
         long a=gcd(x,y);
          
            System.out.println(gcd(x,y));
    }
}
--------------------Configuration: <Default>--------------------
1
Process completed.

b9833107 提到...

--------------------Configuration: --------------------
1

Process completed.

b9833104 提到...

public class ex6
   {
    static long gcd(long x,long y)
    {
      long r=x%y;
      if(r==0)return y;
      else
         return gcd(y,r);
    }
    public static void main(String ggd[])
    {
      long x=10^10+1L,y=10^11+2L;
      System.out.print("gcd:"+gcd(x,y));
    }
}

B9833083 提到...

public class GCD {
  
   static long gcd (long x, long y)
   {
         long r = x % y;
        
         if(r == 0) return y;
        
         else
           
         return gcd(y,r);   
     
     
      }
    public static void main (String argv[])
      {
         long x = 10000000001L ;
        
         long y = 100000000002L;
        
        long a = gcd(x,y);
        
         System.out.println(gcd(x,y));   
        
    }  
   
}

b9833119 提到...

public class text {
    public static void main(String[] erg) {
      long i=10000000001L,j=100000000002L;
      System.out.println(i);
      System.out.println(j);
      System.out.print("GCD:"+gcd(i,j));
          }
  
   public static long gcd(long x,long y){
      long r=x%y;
      if (r==0)
      return y;
      else return gcd(y,r);
      } 
}

B9833074 提到...

/**
 * @(#)Gc.java
 *
 *
 * @author
 * @version 1.00 2010/11/1
 */

public class Gc {
   static long gcd(long x,long y)
   {
      long r=x%y;
      if(r==0)return y;
      else
         return gcd(y,r);
   }
public static void main(String [] argv)
{
      long x=10000000001L;
      long y=100000000002L;
   System.out.println(gcd(x,y));}
}

B9633031 提到...


public class EX789 {
static long  gcd(long  x,long  y)
{
   long  r=x%y;
   if(r==0)
   return y;
   else
   return gcd(y,r);
}
public static void main(String[]args)
{
   long x=100000000001L;
   long y=1000000000002L;
   System.out.println("最大公因數="+gcd(x,y));
     
}
}

B9733153 提到...

public class b123 {

static long gcd(long x ,long y)
{
long r = x%y;
if(r==0)return y;
else
return gcd(y,r);
}

public static void main(String[] args)
{
long x=10000000001L;
long y=100000000002L;
long a=gcd(x,y);
System.out.println(gcd(x,y));

}

}

B9833080 提到...

public class EX06 {
   static long gcd (long x,long y)
      {
         long r=x%y;
         if(r==0)return y;
         else
            return gcd (y,r);
                      
    }
    static public void main(String[]args)throws Exception
            {
         long x=1000000001L;
         long y=10000000002L;
         System.out.println(gcd(x,y));
     
      }
   
}

B9833075 提到...

public class GCD {
    static long gcd(long x,long y)
   {
      long r=x%y;
      if(r==0)return y;
      else
      return gcd(y,r);
     
    }
   
    public static void main(String[]args)throws Exception
    {
      long x=1000000001L;
      long y=10000000001L;
      System.out.print(gcd(x,y));
    }
   
}

b9833088 提到...

/**
* @(#)sweet.java
*
*
* @author
* @version 1.00 2010/11/1
*/


public class sweet
{
static long gcd(long x,long y)
{
long r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
static public void main(String gcd[])
{
long x=10^10+1;
long y=10^11+2;
System.out.print("gcd"+gcd(x,y));
}
}

B9833077 提到...

public class GCD {
static long gcd(long x,long y)
{
   long r = x % y;
   if (r==0) return y;
   else
      return gcd (y,r);
}  
   public static void main (String[] args)
   {
      long x = 10000000001L;
      long y = 100000000002L;
      long a = gcd(x,y);
     
      System.out.println(gcd(x,y));
   }
   
}

B9833116 提到...

public class B9833116 {
    static  long gcd (long x, long y)
  
    {
      long r=x%y;
      if (r==0)return y;
           else
            return gcd (y,r);
    }
    public static void main(String arg[])
    {
      long x=10000000001L;
      long y=100000000002L;
         long a=gcd(x,y);
            System.out.println(gcd(x,y));
    }

B9833076 提到...

public class ex1 {
static long gcd(long x,long y)
{
   long r=x%y;
      if(r==0) return y;
      else
         return gcd(y,r);       
}
public static void main (String[] args)throws Exception
{
   long x=10000000001L;
   long y=100000000002L;
   System.out.println(gcd(x,y));
}
   
   
}

B9833115 提到...


public class B9833115 {
  static  long gcd (long x, long y)
  
    {
      long  r=x%y;
      if (r==0)return y;
           else
            return gcd (y,r);
    }
    public static void main(String arg[])
    {
    long x=10000000001L;
    long y=100000000002L;
        long a=gcd(x,y);
          
            System.out.println(gcd(x,y));
    }
}
 
--------------------Configuration: <Default>--------------------
1
Process completed.

B9633031 提到...

public class EX789 {
static long  gcd(long  x,long  y)
{
   long  r=x%y;
   if(r==0)
   return y;
   else
   return gcd(y,r);
}
public static void main(String[]args)
{
   long x=100000000001L;
   long y=1000000000002L;
   System.out.println("最大公因數="+gcd(x,y));
     
}
}
 

B9833118 提到...


public class B9833118 {
    static long gcd(long x,long y) {
    long r=x%y;
    if (r==0) return y;
    else return gcd(y,r);
    }
     
   public static  void main (String arg[])
    {
      long x=10000000001L;
      long y=100000000002L;
     
      long i=gcd(x,y);
      System.out.println(gcd(x,y));
    }
    
    
   
    }

b9833111 提到...

public class EX1 {
  
static long gcd (long x,long y)
   {
      long r=x%y;
         if(r==0)return y;
         else
         return gcd(y,r);
   }
public static void main (String[] args)throws Exception
{
 long x=10000000001L;
 long y=100000000002L;
                 
 System.out.println(gcd(x,y));
}
              
              
              
}

B9833080 提到...

public class EX06 {
   static long gcd (long x,long y)
      {
         long r=x%y;
         if(r==0)return y;
         else
            return gcd (y,r);
                      
    }
    static public void main(String[]args)throws Exception
            {
         long x=1000000001L;
         long y=10000000002L;
         System.out.println(gcd(x,y));
     
      }
   
}

b9833089 提到...

public class B9833089 {
static long gcd(long x,long y)
      {
      long r=x%y;
      if(r==0)
         return y;
      else
         return gcd(y,r);
      }
    static public void main(String gcd[])
    {
      long x=10^10+1,y=10^11+2;
      System.out.print("gcd:"+gcd(x,y));
    } 

B9833061 提到...

/**
 * @(#)gcd.java
 *
 *
 * @author
 * @version 1.00 2010/11/1
 */

public class gcd
{
     static long gcd(long x,long y)
     {
      long r=x%y;
      if(r==0)
         return y;
       else
       return gcd(y,r);
       }
     static public  void main (String gcd[])
      {
         long x=10^10+1;
         long y=10^11+2;
         System.out.printf("gcd是:"+gcd(x,y));
             }
}

b9833062 提到...

/**
 * @(#)b9833062.java
 *
 *
 * @author
 * @version 1.00 2010/11/1
 */

public class b9833062 {static long gcd(long x,long y)
      {
      long r=x%y;
      if(r==0)
         return y;
      else
         return gcd(y,r);
      }
    static public void main(String gcd[])
    {
      long x=10^10+1,y=10^11+2;
      System.out.print("gcd:"+gcd(x,y));
    }
}

B9833068 提到...

public class B9833068 {
static long gcd(long x,long y)
      {
      long r=x%y;
      if(r==0)
         return y;
      else
         return gcd(y,r);
      }
    static public void main(String gcd[])
    {
      long x=10^10+1,y=10^11+2;
      System.out.print("gcd:"+gcd(x,y));
    } 

B9833094 提到...

public class two {
  
   static long gcd(long x,long y)
   {
      long r=x%y;
      if(r==0) return y;
      else
         return gcd(y,r);
     
      }
public static void main (String[] avgs)throws Exception
{
   long x=10000000001L;
   long y=100000000002L;
  
   System.out.println(gcd(x,y));
  
   }
 
   
   
}

B9833065 提到...

public class ex4
{
    static long gcd(long x,long y)
    {
      long r=x%y;
      if(r==0)return y;
      else
         return gcd(y,r);
    }
    static public void main(String gcd[])
    {
      long x=10^10,y=10^11;;
      System.out.print("gcd:"+gcd(x,y));
    }
   
}

B9833186 提到...

public class EX1 {
static long gcd (long x,long y)
{
  long r=x%y;
  if(r==0) return y;
  else
   return gcd(y,r);
  
}   
public static void main (String[] avgs) throws Exception
{
   long x=10000000001L;
   long y=100000000002L;
System.out.println(gcd(x,y));
}  
   
   
   
   
}

B9633018 提到...

public class B9633018 {

static long gcd(long x,long y) {
long r=x%y;
if (r==0) return y;
else return gcd(y,r);
}

public static void main (String arg[])
{
long x=10000000001L;
long y=100000000002L;

long i=gcd(x,y);
System.out.println(gcd(x,y));
}



}

b9633039 提到...

public class B9633039 {

static long gcd(long x,long y) {
long r=x%y;
if (r==0) return y;
else return gcd(y,r);
}

public static void main (String arg[])
{
long x=10000000001L;
long y=100000000002L;

long i=gcd(x,y);
System.out.println(gcd(x,y));
}



}

b9833096 提到...

public class B9833096 {
   static long gcd (long x, long y)
   {
      long r = x % y;
      if(r==0)return y;
      else
      return gcd (y,r);
     
   }
    public static void main(String argv[])
    {
      long x = 100000000001L;
     
      long y = 1000000000002L;
     
      long a = gcd (x,y);
     
      System.out.println(gcd(x,y));
    
    }
   
   
}

b9833114 提到...

public class b9833114   {
    static long gcd (long x, long y)
  {
      long r = x % y;
      if(r==0)return y;
      else
      return gcd (y,r);
     
  }
    public static void main(String argv[])
    {
      long x = 100000000001L;
     
      long y = 1000000000002L;
     
      long a = gcd (x,y);
     
      System.out.println(gcd(x,y));
   
    }
   
   
   
}

b9833110 提到...

public class b9833110   {
    static long gcd (long x, long y)
  {
      long r = x % y;
      if(r==0)return y;
      else
      return gcd (y,r);
     
  }
    public static void main(String argv[])
    {
      long x = 100000000001L;
     
      long y = 1000000000002L;
     
      long a = gcd (x,y);
     
      System.out.println(gcd(x,y));
   
    }
  
   
   
}

B9833081 提到...

public class TEX {
  static long gg(long a , long b)
  {
   long r=a%b ;
   if(r==0) return b;
   else return gg(b,r);
  
   }
  
   public static void main (String X[])
   {
      long a=10000000001L;
      long b=100000000002L;
     
      long i= gg(a,b);
      System.out.println(gg(a,b));
     
      }
   
   
}

b9833069 提到...

public class hmgdgdk {
    static long min (long x,long y)
    {
    long r=x%y;
    if(r==0) return y;
    else
         return min(y,r);
    }
    static public void main(String yo[])
    {
      long x=10000000001L;
      long y=100000000002L;
      System.out.println(min(x,y));
}
}

B9833080 提到...

public class EX06 {
   static long gcd (long x,long y)
      {
         long r=x%y;
         if(r==0)return y;
         else
            return gcd (y,r);
                      
    }
    static public void main(String[]args)throws Exception
            {
         long x=1000000001L;
         long y=10000000002L;
         System.out.println(gcd(x,y));
     
      }
   
}

b9833181 提到...

class gcd
{
 static float gcd(float a,float b)
 {
  float r=a%b;
  if(r==0) return b;
  else return gcd(b,r);
 }
 static public void main(String args[])
 {
  System.out.println(gcd(100000000002l,10000000001l));
 }
}

b9833073 提到...

public class B9833073
{
   static long gcd(long x,long y)
      {
      long r=x%y;
      if(r==0)
         return y;
      else
         return gcd(y,r);
      }
    static public void main(String gcd[])
    {
      long x=10^10+1,y=10^11+2;
      System.out.print("gcd:"+gcd(x,y));
    }      
}

b9833109 提到...


public class gce {static long gcd(long x,long y)
{
      long r=x%y;
      if(r==0)
         return y;
      else
         return gcd(y,r);
 }
 static public void main(String gcd[])
  {
      long x=10^10+1;
      long y=10^11+2;
      System.out.print("gcd:"+gcd(x,y));
    }
}

B9833106 提到...

public class b {static int gcd(int x,int y)
      {
      int r=x%y;
      if(r==0)
         return y;
      else
         return gcd(y,r);
      }
    static public void main(String gcd[])
    {
      int x=10^10+1,y=10^11+2;
      System.out.print("gcd:"+gcd(x,y));
    }
}

b9833089 提到...

 
public class b {static long gcd(long x,long y)
{
      long r=x%y;
      if(r==0)
         return y;
      else
         return gcd(y,r);
}
 

 static public void main(String gcd[])
 {
      long x=10^10+1,y=10^11+2;
      System.out.print("gcd:"+gcd(x,y));
 }
}

b9833185 提到...

class gcd
{
 static float gcd(float a,float b)
 {
  float c=a%b;
  if(c==0) return b;
  else return gcd(b,c);
 }
 static public void main(String args[])
 {
  System.out.println(gcd(10000000001l,100000000002l));
 }
}

b9833062 提到...

public class B9833062 {
 
  public static void main(String arg[])      
  {
   long f[] = new long [51];
   f[0]= f[1]= 1;
 
   for (int n=2;n<51;n++)
   {
    f[n]=f[n-1]+f[n-2];
    System.out.println(n+"->"+f[n]);
   
   }
   
  }
  }

Related Posts Plugin for WordPress, Blogger...

熱門文章