锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲第一永久AV网站久久精品男人的天堂AV ,热久久国产欧美一区二区精品,怡红院日本一道日本久久 http://www.shnenglu.com/Icho/category/14622.htmlSome birds aren`t meant to be caged, their feathers are just too bright... ...zh-cnThu, 19 Aug 2010 17:06:07 GMTThu, 19 Aug 2010 17:06:07 GMT60SGU 118 Digital Roothttp://www.shnenglu.com/Icho/archive/2010/08/19/123977.htmlBrianBrianThu, 19 Aug 2010 07:35:00 GMThttp://www.shnenglu.com/Icho/archive/2010/08/19/123977.htmlhttp://www.shnenglu.com/Icho/comments/123977.htmlhttp://www.shnenglu.com/Icho/archive/2010/08/19/123977.html#Feedback0http://www.shnenglu.com/Icho/comments/commentRss/123977.htmlhttp://www.shnenglu.com/Icho/services/trackbacks/123977.html杈撳叆鍖呭惈K涓祴璇曟牱渚嬨傝緭鍏ョ涓琛屼細緇欏嚭 K (1<=K<=5)銆傛瘡涓祴璇曟牱渚嬪崰涓琛屻傝繖涓琛岀殑絎竴涓暟鏄竴涓鏁存暟N (N<=1000)銆?鎺ョ潃鏄疦涓潪璐熸暣鏁?(搴忓垪 A)銆?鍧囦笉瓚呰繃109銆?/p> 鏁版牴(鐧懼害鐭ラ亾): http://zhidao.baidu.com/question/29789035.html
瀵逛簬姹備綑鏁扮殑闂鏄垜涓寮濮嬪氨蹇界暐浜嗙殑鍦版柟錛屽悗鏉ョ湅浜咹PF鐨勫崥瀹紝鎵嶇煡閬撴湁榪欐牱鐨勬妧宸?
   (A+B)mod C = (A mod C) + (B mod C)
   (AB) mod C = (A mod C) × (B mod C)

C緙栬瘧鍣?, 0MS  0KB , 濡傛灉浣犳妸鍓嶄袱鍙ュ畾涔夊彉閲忕殑璇彞瀵硅皟錛屽皢浼氳楄垂 20MS 鐨勬椂闂?br>
#include <stdio.h>
int main() 
{
    
int i=0,j,K,N,temp,m;
    
long int A;
    scanf(
"%d",&K);
    
for (; i<K; i++) {
        scanf(
"%d",&N);
        m
=1;
        A
=0;
        
for (j=0; j<N; j++) {
            scanf(
"%d",&temp);
            temp
%=9;
            m
=(m*temp)%9;
            A
=(A+m)%9;
        }
        printf(
"%d\n",(A+8)%9+1);
    }
    
return 0;
}


Brian 2010-08-19 15:35 鍙戣〃璇勮
]]>
SGU 111 Very simple problemhttp://www.shnenglu.com/Icho/archive/2010/08/19/123969.htmlBrianBrianThu, 19 Aug 2010 06:36:00 GMThttp://www.shnenglu.com/Icho/archive/2010/08/19/123969.htmlhttp://www.shnenglu.com/Icho/comments/123969.htmlhttp://www.shnenglu.com/Icho/archive/2010/08/19/123969.html#Feedback0http://www.shnenglu.com/Icho/comments/commentRss/123969.htmlhttp://www.shnenglu.com/Icho/services/trackbacks/123969.html甯屾湜澶х墰浠寚鏁?/span>錛?br>
#include <iostream>
#include 
<stdio.h>
using namespace std;

int main()
{
    __int64 x,left,right,mid;
    scanf(
"%I64d",&x); 
    left
=0;
    right
=x+1;
    
while ((left+1)<right) // 浜屽垎鏌ユ壘
    {
        mid
=(left+right)/2;
        
if(mid*mid<=x)
          left
=mid;
        
else
          right
=mid;
    }
    printf(
"%I64d",left);
    
return 0;
}


Brian 2010-08-19 14:36 鍙戣〃璇勮
]]>
SGU 107 987654321 problemhttp://www.shnenglu.com/Icho/archive/2010/08/17/123698.htmlBrianBrianTue, 17 Aug 2010 05:27:00 GMThttp://www.shnenglu.com/Icho/archive/2010/08/17/123698.htmlhttp://www.shnenglu.com/Icho/comments/123698.htmlhttp://www.shnenglu.com/Icho/archive/2010/08/17/123698.html#Feedback0http://www.shnenglu.com/Icho/comments/commentRss/123698.htmlhttp://www.shnenglu.com/Icho/services/trackbacks/123698.htmlFor given number N you must output amount of N-digit numbers, such, that last digits of their square is equal to 987654321.

Input

Input contains integer number N (1<=N<=106)
棣栧厛鎯沖埌鐨勬槸鏋氫婦錛屾垜紜疄涔熻繖涔堝仛浜嗭紝5~8鏃犳灉錛屽浜?錛屾垜鐨?5騫存柟姝?Pentium M  涓婅窇浜嗚凍瓚?鍒嗗崐閽熶箣涔咃紝鎴戜竴寮濮嬭繕浠ヤ負姝誨驚鐜簡錛屽悗鏉ュ嚭鏉ュ叓涓粨鏋滐紝涔熷幓緗戜笂鏍稿浜嗕竴涓嬶紝紜疄婊¤凍鐨勫彧鏈夎繖鍏釜:
   111111111
   119357639
   380642361
   388888889
   611111111
   619357639
   880642361
   888888889
鎴戞病鏈夊榪囨暟璁猴紝鎵懼埌涓綃囧崥鏂囷紝瀵逛簬鏁拌瑙f硶璁茬殑榪樼畻娓呮錛屼笉榪囩敤pascal鍐欏氨錛屾垜鑷繁鐢–鍐欎簡涓涓嬶紝絎笁嬈C浜嗐傚崥鏂囬摼鎺ュ涓嬶細http://blog.csdn.net/Skyprophet/archive/2009/10/05/4634801.aspx

#include <stdio.h>
int main()
{
    
int N,i=0;
    scanf(
"%d",&N);
    
if (N<=8)
        printf(
"0\n");
    
else if (N==9)
        printf(
"8\n");
    
else
    {
        printf(
"72");
        
for (; i<N-10; i++)
            printf(
"0");
        printf(
"\n");
    }
    
return 0;
}
336MS  0K

Brian 2010-08-17 13:27 鍙戣〃璇勮
]]>
SGU 105 Div 3http://www.shnenglu.com/Icho/archive/2010/08/17/123697.htmlBrianBrianTue, 17 Aug 2010 05:26:00 GMThttp://www.shnenglu.com/Icho/archive/2010/08/17/123697.htmlhttp://www.shnenglu.com/Icho/comments/123697.htmlhttp://www.shnenglu.com/Icho/archive/2010/08/17/123697.html#Feedback0http://www.shnenglu.com/Icho/comments/commentRss/123697.htmlhttp://www.shnenglu.com/Icho/services/trackbacks/123697.html

There is sequence 1, 12, 123, 1234, ..., 12345678910, ... . Given first N elements of that sequence. You must determine amount of numbers in it that are divisible by 3. (鎵懼嚭榪欎釜鏁板垪1-N鍙峰厓绱犱腑鑳借3鏁撮櫎鐨勬湁澶氬皯涓?

Input

Input contains N (1<=N<=231 - 1).

涓涓暟涔樹互10浠ュ悗錛屾ā3鍚庣粨鏋滀笉鍙橈紝絎?錛?錛?錛?1錛?4錛?7........欏規弧瓚寵姹?br>

#include <stdio.h>
int main()
{
    
int N;
    scanf(
"%d",&N);
    N
--;
    printf(
"%d\n", N-(N/3));
    
return 0;
}  
// 0K  0MS


Brian 2010-08-17 13:26 鍙戣〃璇勮
]]>
SGU 102 Coprimeshttp://www.shnenglu.com/Icho/archive/2010/08/17/123696.htmlBrianBrianTue, 17 Aug 2010 05:24:00 GMThttp://www.shnenglu.com/Icho/archive/2010/08/17/123696.htmlhttp://www.shnenglu.com/Icho/comments/123696.htmlhttp://www.shnenglu.com/Icho/archive/2010/08/17/123696.html#Feedback0http://www.shnenglu.com/Icho/comments/commentRss/123696.htmlhttp://www.shnenglu.com/Icho/services/trackbacks/123696.html4) 錛屾壘鍑烘墍鏈変笉澶т簬N涓斾笌N浜掕川鐨勬鏁存暟涓暟銆?br>涓や釜姝f暣鏁癆鍜孊浜掕川鐨勬剰鎬濇槸瀹冧滑鐨勬渶澶у叕綰︽暟鏄?銆傜幇鐪嬩竴涓嬬櫨搴︾櫨縐戜笂鍏充簬璐ㄦ暟鐨勫畾涔夊惂銆?br>褰撴垜閲囩敤鐩存帴鏁扮殑鍔炴硶AC鍚庯紝鎴戝彂鐜?font color=#3366ff>璺熻川鏁板畬鍏ㄦ病鏈夊叧緋匯?/font>
#include<stdio.h>

int gcd(int m,int n) // greatest common divisor
{
    
int r=m%n;
    
while(r)         // 杈楄漿鐩擱櫎娉曪紝TAOCP鐨勭涓涓畻娉?/span>
    {
        m
=n;
        n
=r;
        r
=m%n;
    }
    
return n;
}

int main()
{
    
int N,c=0,i=1// must start with 1 !
    scanf("%d",&N);
    
for (; i<=N; i++)
        
if (gcd(N,i)==1// question hint
            c++;
    printf(
"%d",c);
    
return 0;
}
//  102  .C Accepted 0 ms 0 kb 


Brian 2010-08-17 13:24 鍙戣〃璇勮
]]>
SGU 113 Nearly prime numbershttp://www.shnenglu.com/Icho/archive/2010/08/17/123695.htmlBrianBrianTue, 17 Aug 2010 05:23:00 GMThttp://www.shnenglu.com/Icho/archive/2010/08/17/123695.htmlhttp://www.shnenglu.com/Icho/comments/123695.htmlhttp://www.shnenglu.com/Icho/archive/2010/08/17/123695.html#Feedback0http://www.shnenglu.com/Icho/comments/commentRss/123695.htmlhttp://www.shnenglu.com/Icho/services/trackbacks/123695.html

Nearly prime number is an integer positive number for which it is possible to find such primes P1 and P2 that given number is equal to P1*P2. There is given a sequence on N integer positive numbers, you are to write a program that prints “Yes” if given number is nearly prime and “No” otherwise.

Input

Input file consists of N+1 numbers. First is positive integer N (1£N£10). Next N numbers followed by N. Each number is not greater than 109. All numbers separated by whitespace(s).

Output

Write a line in output file for each number of given sequence. Write “Yes” in it if given number is nearly prime and “No” in other case.
涓嶇敤綆early prime numbers 鍒板簳鏄釜浠涔堟暟錛屾諱箣鏄袱涓川鏁扮殑涔樼Н灝卞浜嗐傛灇涓劇殑鑼冨洿: 2 ~ 32000 (104.5 )
鎴戠殑鎬濊礬鏄? 棣栧厛鎶?~32000涔嬮棿鐨勬墍鏈夌礌鏁伴兘瀛樻斁鍦ㄤ竴涓暟緇勯噷錛岀劧鍚庡綋浣犺緭鍏ヤ竴涓暟鎹椂錛屽厛璁╁叾閫愪竴妯¢櫎榪欎釜鏁扮粍閲岀殑绱犳暟錛屼竴鏃︽ā闄ょ粨鏋滀負0錛屽垯璁$畻鍑轟粬浠殑鍟嗭紝鍐嶅垽鏂晢鏄惁涔熶負绱犳暟銆?strong>娉ㄦ剰鏁版嵁鏄袱涓暟鐨勫鉤鏂圭殑澶勭悊

SGU 113 Nearly prime numbers  - Icho - Brian Warehouse#include <stdio.h>
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse#include 
<math.h>
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse
int prime[30000],M=0;
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse
int isP(int n) //鍒ゆ柇鏄惁涓虹礌鏁?闈炲父綺劇‘鑰岄珮鏁?/span>
SGU 113 Nearly prime numbers  - Icho - Brian WarehouseSGU 113 Nearly prime numbers  - Icho - Brian Warehouse
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse{
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse    
int i=2,t=sqrt(n);
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse    
if ((n != 2 && !(n % 2)) || (n != 3 && !(n % 3)) || 
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse        (n 
!= 5 && !(n % 5)) || (n != 7 && !(n % 7)))
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse        
return 0;
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse    
for (; i<=t; i++)
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse        
if (n%== 0)
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse            
return 0;
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse    
return 1;
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse}

SGU 113 Nearly prime numbers  - Icho - Brian Warehouse
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse
int isNP(int n)
SGU 113 Nearly prime numbers  - Icho - Brian WarehouseSGU 113 Nearly prime numbers  - Icho - Brian Warehouse
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse{
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse    
int i=0,t=sqrt(n),r;
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse    
for (; prime[i]<=t; i++// 騫蟲柟鍦ㄦ澶勭悊
SGU 113 Nearly prime numbers  - Icho - Brian WarehouseSGU 113 Nearly prime numbers  - Icho - Brian Warehouse
    SGU 113 Nearly prime numbers  - Icho - Brian Warehouse{
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse        
if (n%prime[i] == 0// 妯¢櫎璇曞晢
SGU 113 Nearly prime numbers  - Icho - Brian WarehouseSGU 113 Nearly prime numbers  - Icho - Brian Warehouse
        SGU 113 Nearly prime numbers  - Icho - Brian Warehouse{
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse            r
=n/prime[i]; // 姹傚晢
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse
            if (isP(r))
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse                
return 1;
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse        }

SGU 113 Nearly prime numbers  - Icho - Brian Warehouse    }

SGU 113 Nearly prime numbers  - Icho - Brian Warehouse    
return 0;
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse}

SGU 113 Nearly prime numbers  - Icho - Brian Warehouse
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse
int main()
SGU 113 Nearly prime numbers  - Icho - Brian WarehouseSGU 113 Nearly prime numbers  - Icho - Brian Warehouse
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse{
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse    
int i=3,N,m;    
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse    
for (prime[M++]=2; i<32000; i+=2)
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse        
if (isP(i))
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse            prime[M
++]=i;
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse    
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse    scanf(
"%d",&N);
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse    
while (N--)
SGU 113 Nearly prime numbers  - Icho - Brian WarehouseSGU 113 Nearly prime numbers  - Icho - Brian Warehouse    
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse{
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse        scanf(
"%d",&m);
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse        
if (m==6)
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse            printf(
"Yes\n"); // 紼嬪簭涓敮涓鏈В鍐崇殑闂,鏈涘悇璺ぇ鐗涙寚鏁?
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse
        else printf("%s\n",isNP(m) ? "Yes":"No");
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse    }

SGU 113 Nearly prime numbers  - Icho - Brian Warehouse    
return 0;
SGU 113 Nearly prime numbers  - Icho - Brian Warehouse}



Brian 2010-08-17 13:23 鍙戣〃璇勮
]]>
SGU 112 a^b-b^a (Java Edition)http://www.shnenglu.com/Icho/archive/2010/08/17/123694.htmlBrianBrianTue, 17 Aug 2010 05:21:00 GMThttp://www.shnenglu.com/Icho/archive/2010/08/17/123694.htmlhttp://www.shnenglu.com/Icho/comments/123694.htmlhttp://www.shnenglu.com/Icho/archive/2010/08/17/123694.html#Feedback0http://www.shnenglu.com/Icho/comments/commentRss/123694.htmlhttp://www.shnenglu.com/Icho/services/trackbacks/123694.htmlYou are given natural numbers a and b. Find ab-ba.

Input

Input contains numbers a and b (1≤a,b≤100).

Output

Write answer to output.

Sample Input

2 3

Sample Output

-1

涓鐪嬪埌榪欑棰樼洰錛屽氨鎯沖埌楂樼簿搴︾畻娉曪紝Java鐨勫ぇ鏁般?br>姝や婦紜疄嫻佹皳浜嗕竴鐐癸紝涓嶈繃紜疄榪囦簡錛岄剻浜虹殑絎竴棰楽GU鍟婏紝涓嶈鎵撳嚮銆?br>榪囨鏃墮棿鐪嬬湅鑳戒笉鑳藉啓鍑?(C++ Edition) ,鍟ヤ篃鍒浜嗭紝涓婁唬鐮併?br>

SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouseimport java.math.*;
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse
import java.util.*;
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse
public class Solution
SGU 112 a^b-b^a (Java Edition) - Icho - Brian WarehouseSGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse{
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse   
public static void main(String[] args)
SGU 112 a^b-b^a (Java Edition) - Icho - Brian WarehouseSGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse   
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse{
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse      Scanner in 
= new Scanner(System.in);
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse      
int a = in.nextInt();
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse      
int b = in.nextInt();
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse      
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse      BigInteger A
=BigInteger.valueOf(a);
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse      BigInteger B
=BigInteger.valueOf(b); // A^B
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse
      BigInteger rA=BigInteger.valueOf(a);
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse      BigInteger rB
=BigInteger.valueOf(b); // store the result after computing
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse
      
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse      
for(int i=1; i<b; i++// just b-1 times
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse
          rA=rA.multiply(A);
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse      
for(int i=1; i<a; i++)    
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse          rB
=rB.multiply(B);
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse      System.out.println(rA.subtract(rB)); 
// sub
SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse
   }

SGU 112 a^b-b^a (Java Edition) - Icho - Brian Warehouse}

闄勩奀ore Java I銆嬮噷鍏充簬 澶ф暟鐨勭畝鍗曚粙緇嶏紝璁茬殑綆楁瘮杈冩竻鏅扮殑浜嗭細
Big Numbers
If the precision of the basic integer and floating-point types is not sufficient, you can
turn to a couple of handy classes in the java.math package: BigInteger and BigDecimal. These
are classes for manipulating numbers with an arbitrarily long sequence of digits. The
BigInteger class implements arbitrary precision integer arithmetic, and BigDecimal does the
same for floating-point numbers.
Use the static valueOf method to turn an ordinary number into a big number:
BigInteger a = BigInteger.valueOf(100);
Unfortunately, you cannot use the familiar mathematical operators such as + and * to
combine big numbers. Instead, you must use methods such as add and multiply in the big
number classes.
BigInteger c = a.add(b); // c = a + b
BigInteger d = c.multiply(b.add(BigInteger.valueOf(2))); // d = c * (b + 2)
C++ NOTE: Unlike C++, Java has no programmable operator overloading. There was no way
for the programmer of the BigInteger class to redefine the + and * operators to give the add and
multiply operations of the BigInteger classes. The language designers did overload the + operator
to denote concatenation of strings. They chose not to overload other operators, and they
did not give Java programmers the opportunity to overload operators in their own classes.
Listing 3–6 shows a modification of the lottery odds program of Listing 3–5, updated to
work with big numbers. For example, if you are invited to participate in a lottery in
which you need to pick 60 numbers out of a possible 490 numbers, then this program
will tell you that your odds are 1 in 7163958434619955574151162225400929334117176
12789263493493351 013459481104668848. Good luck!
The program in Listing 3–5 computed the statement
lotteryOdds = lotteryOdds * (n - i + 1) / i;
When big numbers are used, the equivalent statement becomes
lotteryOdds = lotteryOdds.multiply(BigInteger.valueOf(n - i + 1)).divide(BigInteger.valueOf(i));
Listing 3–6 BigIntegerTest.java
1. import java.math.*;
2. import java.util.*;
3.
4. /**
5. * This program uses big numbers to compute the odds of winning the grand prize in a lottery.
6. * @version 1.20 2004-02-10
7. * @author Cay Horstmann
8. */
9. public class BigIntegerTest
10. {
11. public static void main(String[] args)
12. {
13. Scanner in = new Scanner(System.in);
14.
15. System.out.print("How many numbers do you need to draw? ");
16. int k = in.nextInt();
17.
18. System.out.print("What is the highest number you can draw? ");
19. int n = in.nextInt();
20.
21. /*
22. * compute binomial coefficient n*(n-1)*(n-2)*...*(n-k+1)/(1*2*3*...*k)
23. */
24.
25. BigInteger lotteryOdds = BigInteger.valueOf(1);
26.
27. for (int i = 1; i <= k; i++)
28. lotteryOdds = lotteryOdds.multiply(BigInteger.valueOf(n - i + 1)).divide(
29. BigInteger.valueOf(i));
30.
31. System.out.println("Your odds are 1 in " + lotteryOdds + ". Good luck!");
32. }
33. }

java.math.BigInteger

? BigInteger add(BigInteger other)
? BigInteger subtract(BigInteger other)
? BigInteger multiply(BigInteger other)
? BigInteger divide(BigInteger other)
? BigInteger mod(BigInteger other)
returns the sum, difference, product, quotient, and remainder of this big integer and
other.
? int compareTo(BigInteger other)
returns 0 if this big integer equals other, a negative result if this big integer is less
than other, and a positive result otherwise.
? static BigInteger valueOf(long x)
returns a big integer whose value equals x.
? BigDecimal add(BigDecimal other)
? BigDecimal subtract(BigDecimal other)
? BigDecimal multiply(BigDecimal other)
? BigDecimal divide(BigDecimal other, RoundingMode mode) 5.0
returns the sum, difference, product, or quotient of this big decimal and other.
To compute the quotient, you must supply a rounding mode. The mode
RoundingMode.HALF_UP is the rounding mode that you learned in school (i.e., round
down digits 0 . . . 4, round up digits 5 . . . 9). It is appropriate for routine
calculations. See the API documentation for other rounding modes.
? int compareTo(BigDecimal other)
returns 0 if this big decimal equals other, a negative result if this big decimal is less
than other, and a positive result otherwise.
? static BigDecimal valueOf(long x)
? static BigDecimal valueOf(long x, int scale)
returns a big decimal whose value equals x or x /10scale.



Brian 2010-08-17 13:21 鍙戣〃璇勮
]]>
SGU 鍒嗙被寮綃囪http://www.shnenglu.com/Icho/archive/2010/08/17/123693.htmlBrianBrianTue, 17 Aug 2010 05:17:00 GMThttp://www.shnenglu.com/Icho/archive/2010/08/17/123693.htmlhttp://www.shnenglu.com/Icho/comments/123693.htmlhttp://www.shnenglu.com/Icho/archive/2010/08/17/123693.html#Feedback0http://www.shnenglu.com/Icho/comments/commentRss/123693.htmlhttp://www.shnenglu.com/Icho/services/trackbacks/123693.html101 Domino 嬈ф媺璺?br>102 Coprime 鏋氫婦/鏁板鏂規硶
103 Traffic Lights 鏈鐭礬
104 Little Shop of Flowers 鍔ㄦ佽鍒?br>105 Div 3 鎵捐寰?br>106 The Equation 鎵╁睍嬈у嚑閲屽痙
107 987654321 Problem 鎵捐寰?br>108 Self-numbers II 鏋氫婦+絳涙硶閫掓帹
109 Magic of David Copperfield II 鏋勯?br>110 Dungeon 璁$畻鍑犱綍+妯℃嫙
111 Very Simple Problem 妯℃嫙絎旂畻寮鏂?br>112 a^b-b^a 楂樼簿搴?br>113 Nearly Prime Numbers 鍒よ川鏁?br>114 Telecasting Station 鎵句腑浣嶆暟
115 Calendar 妯℃嫙
116 Index of Super-prime 鍔ㄦ佽鍒?br>117 Counting 蹇熷箓
118 Digital Root 妯℃嫙
119 Magic Pairs 鏋氫婦
120 Archipelago 璁$畻鍑犱綍
121 Bridges Painting 鏋勯?br>122 The Book 鏋勯犲搱瀵嗛】鍥炶礬
123 The Sum 閫掓帹
124 Broken line 璁$畻鍑犱綍
125 Shtirlits 鎼滅儲
126 Boxes 鏁板鏂規硶
127 Telephone directory 緇熻
128 Snake 騫舵煡闆?+ 鏍戠姸鏁扮粍
129 Inheritance 璁$畻鍑犱綍
130 Circle 鍗$壒鍏版暟
131 Hardwood floor 鐘舵佸帇緙╁姩瑙?br>132 Another Chocolate Maniac 鐘舵佸帇緙╁姩瑙?br>133 Border 璐績
134 Centroid 鏍戝瀷DP
135 Drawing Lines 鎵捐寰?br>136 Erasing Edges 鏁板鏂規硶
137 Funny Strings 鏋勯?br>138 Games of Chess 鏋勯?br>139 Help Needed! 鏁板鏂規硶
140 Integer Sequences 鎵╁睍嬈у嚑閲屽痙
141 Jumping Joe 鎵╁睍嬈у嚑閲屽痙
142 Keyword 鏋氫婦
143 Long Live the Queen 鏍戝瀷DP
144 Meeting 鏁板鏂規硶
145 Strange People 浜屽垎絳旀+鎼滅儲
146 The Runner 鏁板鏂規硶
147 Black-white King 鏋氫婦
148 B-Station 鏋氫婦+蹇帓/浜屽垎/鍫?br>149 Computer Network 鏍戝瀷DP
150 Mr. Beetle II 鏋氫婦
151 Construct a triangle 璁$畻鍑犱綍鏋勯?br>152 Making round 鏋勯?br>153 Playing With Matches 鍔ㄦ佽鍒?鎵懼驚鐜妭
154 Factorial 浜屽垎 鏁板鏂規硶
155 Cartesian Tree 寤虹瑳鍗″皵鏍?br>156 Strange Graph 緙╁洟+嬈ф媺鍥炶礬
157 Patience 鎼滅儲+寮琛?br>158 Commuter Train 鏋氫婦
159 Self-replicating Numbers 鎵╁睍闃熷垪+楂樼簿搴?br>160 Magic Multiplying Machine 鍔ㄦ佽鍒?br>161 Intuitionistic Logic 鎼滅儲*
162 Pyramids 鏁板鏂規硶
163 Wise King 妯℃嫙
164 Airlines 璐績
165 Basketball 鏋勯?br>166 Editor 妯℃嫙
167 I-country 鍔ㄦ佽鍒?br>168 Matrix 鍔ㄦ佽鍒?br>169 Numbers 鏁板鏂規硶
170 Particles 璐績
171 Sarov zones 璐績
172 eXam 鍒ゆ柇浜屽垎鍥?br>173 Coins 楂樻柉娑堝厓
174 Wall 騫舵煡闆?Hash
175 Encoding 鎼滅儲/鍔ㄦ佽鍒?br>176 Flow construction 涓婁笅鐣岀綉緇滄祦
177 Sqare 鍊掑簭鏌撹壊
178 Chain 鏁板鏂規硶
179 Brackets light 鎵捐寰?br>180 Inversions 褰掑茍鎺掑簭/楂樼駭鏁版嵁緇撴瀯
181 X-Sequence 鎵懼驚鐜妭
182 Open the Brackets 鎼滅儲
183 Painting the balls 鍔ㄦ佽鍒掍紭鍖?br>184 Patties 鐩存帴璁$畻
185 Two shortest 緗戠粶嫻?br>186 The chain 璐績
187 Twist and whirl -- want to cheat 鍧楃姸閾捐〃
188 Factory guard 鏁板鏂規硶
189 Perl-like Substr 妯℃嫙
190 Dominoes 浜屽垎鍥懼尮閰?br>191 Exhibition 璐績
192 RGB 紱繪暎鍖?錛?緇熻
193 Chinese Girls' Amusement 鏁板鏂規硶 + 楂樼簿搴?br>194 Reactor Cooling 緗戠粶嫻?br>195 New Year Bonus Grant 璐績
196 Matrix Multiplication 鏁板鏂規硶
197 Nice Patterns Strike Back 鍔ㄦ佽鍒?鐭╅樀
198 Get Out! 璁$畻鍑犱綍
199 Beautiful People 鏈闀塊潪闄嶅瓙搴忓垪
200 Cracking RSA 楂樻柉娑堝厓
201 Non Absorbing DFA 鍔ㄦ佽鍒?br>202 The Towers of Hanoi Revisited 鍔ㄦ佽鍒掓瀯閫?br>203 Hyperhuffman 璐績
204 Little Jumper 浜屽垎+鏁板鏂規硶*
205 Quantization Problem 鍔ㄦ佽鍒?

Brian 2010-08-17 13:17 鍙戣〃璇勮
]]>
狠狠人妻久久久久久综合| 思思久久99热只有频精品66| 精品综合久久久久久888蜜芽| 亚洲国产美女精品久久久久∴| 精品久久久久久国产潘金莲| 亚洲国产精品久久久久久| 女人高潮久久久叫人喷水| 精品久久久久久中文字幕人妻最新| 伊人久久免费视频| 久久精品中文字幕一区| 欧美精品一区二区精品久久 | 人人狠狠综合久久88成人| 97久久精品人妻人人搡人人玩| 国内精品久久久久久麻豆| 精品国产乱码久久久久久呢| 国产精品99久久不卡| 精品熟女少妇a∨免费久久| 亚洲国产天堂久久久久久| 久久久青草久久久青草| 精产国品久久一二三产区区别| 精品久久久无码中文字幕| 国产精品久久久久国产A级| 99久久这里只精品国产免费| 久久精品18| 亚洲国产精品久久久久婷婷软件 | 久久精品无码专区免费东京热 | 亚洲av伊人久久综合密臀性色| 精品水蜜桃久久久久久久| 国产欧美久久久精品| 国内精品久久久久久久97牛牛| 无码伊人66久久大杳蕉网站谷歌 | 久久99精品久久久久久9蜜桃| 久久精品国产久精国产思思| 亚洲AV无码久久精品成人| 欧美日韩久久中文字幕| 久久天天躁狠狠躁夜夜躁2014| 久久www免费人成精品香蕉| 国产成人99久久亚洲综合精品| 99久久免费只有精品国产| 秋霞久久国产精品电影院| A级毛片无码久久精品免费|