锘??xml version="1.0" encoding="utf-8" standalone="yes"?>伊人久久大香线蕉av不变影院 ,亚洲美日韩Av中文字幕无码久久久妻妇 ,亚洲AV无码久久精品狠狠爱浪潮 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 鍙戣〃璇勮
]]>
狠狠精品干练久久久无码中文字幕| 久久精品国产亚洲av瑜伽| 亚洲人成无码网站久久99热国产| 伊人久久大香线蕉AV色婷婷色| 久久久久国产精品麻豆AR影院| 久久精品亚洲福利| 久久夜色撩人精品国产| 久久亚洲国产成人影院网站 | 亚洲欧美精品一区久久中文字幕| 久久精品国产精品亚洲| 久久精品国产一区二区| 亚洲午夜久久久影院伊人| 人人狠狠综合久久亚洲88| 久久99精品国产99久久6| 奇米影视7777久久精品人人爽| 色综合久久久久久久久五月| 久久精品人人槡人妻人人玩AV| 久久中文字幕无码专区| 久久久久人妻一区精品色| 国内精品久久久久久久久| 九九精品99久久久香蕉| 国产99久久久久久免费看| 亚洲αv久久久噜噜噜噜噜| 久久国产乱子伦精品免费午夜| 97热久久免费频精品99| 欧美亚洲国产精品久久高清| 精品久久久久一区二区三区| 91精品国产综合久久久久久| 一本一本久久A久久综合精品| 综合久久给合久久狠狠狠97色 | 久久久久久国产精品无码下载| 伊人色综合久久| 99久久国语露脸精品国产| 久久这里只有精品18| 看全色黄大色大片免费久久久| 久久久久无码精品国产app| 亚洲精品高清久久| 9999国产精品欧美久久久久久 | 久久国产精品99久久久久久老狼 | 九九久久精品国产| 国产精品美女久久久|