BlueEyes and Apples (I)

http://cstest.scu.edu.cn/soj/problem.action?id=1074

//package bo_jwolf;
import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Scanner cin = new Scanner( new BufferedInputStream( System.in ) );
		while( true ){
			BigInteger a, b, c;
			a = cin.nextBigInteger();
			b = cin.nextBigInteger();
			if(  a.equals( BigInteger.ZERO ) && b.equals( BigInteger.ZERO ) )
				break;
			c = a.subtract( b );
			if( a.compareTo( b ) == 0 ){
				System.out.print( "well done!\n" );
			}
			else if( a.compareTo( b ) > 0 ){
				System.out.print( c );
				System.out.print( "\n" );
			}
			else
				System.out.print( "are you crazy?\n" );
		}
	}

}


BlueEyes and Apples (I)

上一篇:在手机上编程:自制的小飞可编程复数计算器(小飞计算器)


下一篇:Android自定义View的实现方法,带你一步步深入了解View(四)