锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品永久久久久久久久久,国产真实乱对白精彩久久,免费精品久久天干天干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 鍙戣〃璇勮
]]>
久久精品国产半推半就| 精品久久久久久国产91| 亚洲一区精品伊人久久伊人| 久久伊人中文无码| 麻豆亚洲AV永久无码精品久久| 亚洲国产精品无码久久久蜜芽| 国产精品久久久久久| 国产精品伦理久久久久久| 久久精品久久久久观看99水蜜桃| 99久久99久久久精品齐齐| 久久久久免费视频| 国产亚洲精品自在久久| 中文国产成人精品久久亚洲精品AⅤ无码精品 | 国产亚洲精品久久久久秋霞| 99久久99这里只有免费费精品| 国产—久久香蕉国产线看观看 | 久久久国产精品网站| 亚洲国产视频久久| 91精品国产高清久久久久久国产嫩草 | 97精品依人久久久大香线蕉97 | 国内精品久久人妻互换| 区亚洲欧美一级久久精品亚洲精品成人网久久久久 | 久久无码国产专区精品| 久久国产视屏| 国产精品久久久久影视不卡| 2021国产精品午夜久久| 性做久久久久久免费观看| 91精品日韩人妻无码久久不卡| 日韩久久久久久中文人妻| 色天使久久综合网天天| 欧美日韩久久中文字幕| 亚洲国产成人久久综合一区77| 久久久久国产精品麻豆AR影院| 韩国三级大全久久网站| 国产成年无码久久久久毛片| 久久久久无码精品国产| 精品国产乱码久久久久久1区2区| 无码超乳爆乳中文字幕久久| 人妻无码αv中文字幕久久| 久久久久久国产精品免费无码| 久久久久亚洲AV无码网站|