herrDeng網內搜尋
自訂搜尋
Ads
訂閱:
張貼留言 (Atom)
熱門文章
-
計算你的BMI
-
1. 利用遞迴input n算2^n 2. 用C算GCD(3333,456)
-
請用 C/C++/java寫一簡易程式
-
BMI (Body Mass Index)= 體重 (kg) / 身高 ^2(m 2 ) 在台灣,行政院衛生署乃根據其相關研究,於2002年4月公佈台灣成人肥胖標準: BMI<18.5 為過輕, 18.5≦BMI<24 為正常體重, 24≦BMI<27 為過重, BM...
-
需要練習的Java程式:
-
一、 試利用switch case由程式中直接輸入一個1~7 之間的整數day,代表星期一到星期日。若day 的值是1,則印出 "星期一",若day 的值是2,則印出 "星期二",若day 的值是7,則印出 "星期日",...
-
用 C/C++算上學期加權平均
-
輸出 A A A A A A A A A A A A A A A
55 則留言:
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));
}
}
/**
* @(#)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));
}
}
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));
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));
}
}
/**
* @(#)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);
}
}
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));
}
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));
}
}
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));
}
}
/**
* @(#)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.
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.
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));
}
}
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));
}
}
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));
}
}
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.
--------------------Configuration: --------------------
1
Process completed.
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));
}
}
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));
}
}
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);
}
}
/**
* @(#)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));}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
/**
* @(#)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));
}
}
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));
}
}
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));
}
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));
}
}
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.
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));
}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
/**
* @(#)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.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));
}
}
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));
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
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));
}
}
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]);
}
}
}
張貼留言