锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久久亚洲精品无码蜜桃,色偷偷888欧美精品久久久,99久久精品免费看国产一区二区三区 http://www.shnenglu.com/MiYu/category/14460.html ______________鐧界櫧銇眿zh-cnFri, 22 Oct 2010 15:26:30 GMTFri, 22 Oct 2010 15:26:30 GMT60HDU 1250 HDOJ 1250 Hat's Fibonacci ACM 1250 IN HDUhttp://www.shnenglu.com/MiYu/archive/2010/10/22/130924.htmlMiYuMiYuFri, 22 Oct 2010 12:41:00 GMThttp://www.shnenglu.com/MiYu/archive/2010/10/22/130924.htmlhttp://www.shnenglu.com/MiYu/comments/130924.htmlhttp://www.shnenglu.com/MiYu/archive/2010/10/22/130924.html#Feedback0http://www.shnenglu.com/MiYu/comments/commentRss/130924.htmlhttp://www.shnenglu.com/MiYu/services/trackbacks/130924.htmlMiYu鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?nbsp;______________鐧界櫧銇眿    

 

 棰樼洰鍦板潃 :

http://acm.hdu.edu.cn/showproblem.php?pid=1250

棰樼洰鎻忚堪:

Hat's Fibonacci

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 2208    Accepted Submission(s): 684


Problem Description
A Fibonacci sequence is calculated by adding the previous two members the sequence, with the first two members being both 1.
F(1) = 1, F(2) = 1, F(3) = 1,F(4) = 1, F(n>4) = F(n - 1) + F(n-2) + F(n-3) + F(n-4)
Your task is to take a number as input, and print that Fibonacci number.
 

Input
Each line will contain an integers. Process to end of file.
 

Output
For each case, output the result in a line.
 

Sample Input
100
 

Sample Output
4203968145672990846840663646 Note: No generated Fibonacci number in excess of 2005 digits will be in the test data, ie. F(20) = 66526 has 5 digits.
 

 

 /*

Mail to   : miyubai@gamil.com

MyBlog    : baiyun.me

Link      : http://www.cnblogs.com/MiYu  || http://www.shnenglu.com/MiYu

Author By : MiYu

Test      : 1

Complier  : g++ mingw32-3.4.2

Program   : Hat's Fibonacci

Doc Name  : HDU_1250

*/



/*


楂樼簿搴︾殑姘撮 , JAVA  姘磋繃, 褰撶劧 鐢ㄦā鏉夸篃涓鏍?nbsp;


*/


package main;

import java.util.*;

import java.math.*;

import java.io.*;

public class Main {

    public static void main(String[] args) {

        Scanner cin = new Scanner ( System.in );

        while ( cin.hasNext() ) {

            int N = cin.nextInt();

            if ( N <= 4 ) {

                System.out.println ( 1 );

            } else {

                BigInteger one = new BigInteger ( "1" );

                BigInteger two = new BigInteger ( "1" );

                BigInteger three = new BigInteger ( "1" );

                BigInteger four = new BigInteger ( "1" );

                BigInteger res = new BigInteger ( "1" );

                BigInteger temp = new BigInteger ( "1" );

                for ( int i = 4; i < N; ++ i ) {

                    res = one.add(two).add(three).add(four);

                    temp = res;

                    one= two;

                    two = three;

                    three = four;

                    four = temp;

                }

                System.out.println( res );

            }

        }

    }


}


 



MiYu 2010-10-22 20:41 鍙戣〃璇勮
]]>
HDOJ 1063 HDU 1063 Exponentiation JAVA 緙栧啓 ACM 1063 IN HDUhttp://www.shnenglu.com/MiYu/archive/2010/09/10/126325.htmlMiYuMiYuFri, 10 Sep 2010 09:01:00 GMThttp://www.shnenglu.com/MiYu/archive/2010/09/10/126325.htmlhttp://www.shnenglu.com/MiYu/comments/126325.htmlhttp://www.shnenglu.com/MiYu/archive/2010/09/10/126325.html#Feedback0http://www.shnenglu.com/MiYu/comments/commentRss/126325.htmlhttp://www.shnenglu.com/MiYu/services/trackbacks/126325.htmlMiYu鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?nbsp;______________鐧界櫧銇眿    

 

棰樼洰鍦板潃:  http://acm.hdu.edu.cn/showproblem.php?pid=1063

棰樼洰鎻忚堪:

Exponentiation

Time Limit: 1000/500 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 1696    Accepted Submission(s): 376


Problem Description
Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many computer systems.

This problem requires that you write a program to compute the exact value of Rn where R is a real number ( 0.0 < R < 99.999 ) and n is an integer such that 0 < n <= 25.
 

Input
The input will consist of a set of pairs of values for R and n. The R value will occupy columns 1 through 6, and the n value will be in columns 8 and 9.
 

Output
The output will consist of one line for each line of input giving the exact value of R^n. Leading zeros should be suppressed in the output. Insignificant trailing zeros must not be printed. Don't print the decimal point if the result is an integer.
 

Sample Input
95.123 12 0.4321 20 5.1234 15 6.7592 9 98.999 10 1.0100 12
 

Sample Output
548815620517731830194541.899025343415715973535967221869852721 .00000005148554641076956121994511276767154838481760200726351203835429763013462401 43992025569.928573701266488041146654993318703707511666295476720493953024 29448126.764121021618164430206909037173276672 90429072743629540498.107596019456651774561044010001 1.126825030131969720661201
 

榪欎袱澶╃獊鐒舵兂瀛︿範涓婮AVA 鐨勫ぇ鏁?nbsp; 灝卞涔犱簡涓涓? 榪欓亾棰樺湪PKU A鎺変簡鐨? 涓嶈繃鍦?HDU 涓鐩存病榪? 涓嶇煡閬撴湁浠涔堟伓蹇冪殑鏁版嵁鎶婃垜緇欐伓蹇冩帀浜? 寰堥儊闂?

涓嶈繃 鐢↗AVA鐩存帴 1 A 浜?.......... 寰堢畝鍗曠殑璇?/p>

 

浠g爜濡備笅 :

 

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import java.util.Scanner;
import java.math.*;

/**
 *
 * @author baiyun
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner in = new Scanner ( System.in );
        BigDecimal num;
        int exp;
        while ( in.hasNext() ){
            num = in.nextBigDecimal();
            exp = in.nextInt();
            num = num.pow ( exp );
            num = num.stripTrailingZeros();
            String out = num.toPlainString();
            if ( out.charAt(0) == '0' )
                 out = out.substring(1);
            System.out.println( out );
        }
    }
}

 


 



MiYu 2010-09-10 17:01 鍙戣〃璇勮
]]>
HDOJ HDU 1715 澶ц彶娉㈡暟 ACM 1715 IN HDU http://www.shnenglu.com/MiYu/archive/2010/08/08/122709.htmlMiYuMiYuSun, 08 Aug 2010 14:38:00 GMThttp://www.shnenglu.com/MiYu/archive/2010/08/08/122709.htmlhttp://www.shnenglu.com/MiYu/comments/122709.htmlhttp://www.shnenglu.com/MiYu/archive/2010/08/08/122709.html#Feedback0http://www.shnenglu.com/MiYu/comments/commentRss/122709.htmlhttp://www.shnenglu.com/MiYu/services/trackbacks/122709.htmlMiYu鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?______________鐧界櫧銇眿

棰樼洰鍦板潃:
         http://acm.hdu.edu.cn/showproblem.php?pid=1715
棰樼洰鎻忚堪:
Problem Description
Fibonacci鏁板垪錛屽畾涔夊涓嬶細
f(
1)=f(2)=1
f(n)
=f(n-1)+f(n-2) n>=3銆?br>璁$畻絎琻欏笷ibonacci鏁板箋?br> 

Input
杈撳叆絎竴琛屼負涓涓暣鏁癗錛屾帴涓嬫潵N琛屼負鏁存暟Pi錛?/span>1<=Pi<=1000錛夈?br> 

Output
杈撳嚭涓篘琛岋紝姣忚涓哄搴旂殑f(Pi)銆?br> 

Sample Input
5
1
2
3
4
5
 

Sample Output
1
1
2
3
5


鐪嬮鐩氨鐭ラ亾鏄ぇ鏁頒簡..........鐩存帴妯℃澘鍚?.娌′粈涔堝ソ璇寸殑.
浠g爜濡備笅:
#include <iostream>
#include 
<string>
using namespace std;

string Add(string fNum,string sNum)
{
        
if( fNum.length() < sNum.length() ) fNum.swap(sNum);
        
string A = "0";
        A 
+= fNum;
        
for ( int i=1;i<=fNum.length();i++)
                
if(i<=sNum.length())
                        A[A.length()
-i]+=sNum[sNum.length()-i]-'0';
        
forint i=1;i<A.length();i++)
        {
                
if(A[A.length()-i]>'9')
                { A[A.length()
-i]-=10;A[A.length()-i-1]+=1; }
        }
        
while(A[0]=='0') A.erase(0,1);
        
return A;
}

string F[1001= { "0""1""1" };
void setNum ()
{
     
for ( int i = 3; i != 1001++ i )
     {
           F[i] 
= Add ( F[i-1] , F[i-2] ) ; 
     }  
}
int main ()
{
    
int T;
    setNum ();
    
while ( cin >> T )
    {
            
while ( T -- )
            {
                   
int N;
                   cin 
>> N;
                   cout 
<< F[N] << endl; 
            }
    }
    
return 0
}


MiYu 2010-08-08 22:38 鍙戣〃璇勮
]]>
久久99国产一区二区三区| 国产精品久久久久久久久鸭| 亚洲国产高清精品线久久| 亚洲伊人久久综合影院| 国产精品久久成人影院| 青草久久久国产线免观| 久久婷婷五月综合色高清| 亚洲成人精品久久| 久久人人添人人爽添人人片牛牛| 色诱久久久久综合网ywww| 99久久国产免费福利| 久久久久久亚洲精品影院| 久久99热只有频精品8| 亚洲精品第一综合99久久| 国产韩国精品一区二区三区久久| 国产亚州精品女人久久久久久 | 无码国内精品久久人妻麻豆按摩| 精品无码久久久久国产动漫3d| 91精品国产综合久久香蕉| 亚洲精品乱码久久久久久按摩| 国产国产成人久久精品| 久久人妻少妇嫩草AV无码专区| 国产免费久久精品99re丫y| 天天综合久久久网| 久久综合综合久久综合| 欧美激情一区二区久久久| 久久五月精品中文字幕| 国产精品VIDEOSSEX久久发布| 久久久久亚洲AV成人片| 新狼窝色AV性久久久久久| 久久久久免费精品国产| 久久久久亚洲AV无码专区桃色| 久久精品免费观看| 久久国产免费观看精品3| 久久亚洲AV成人无码电影| 亚洲午夜无码久久久久| 亚洲人成网亚洲欧洲无码久久| 伊人久久一区二区三区无码| 亚洲午夜福利精品久久| 久久天天婷婷五月俺也去| 亚洲欧美日韩精品久久亚洲区|