锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久久亚洲精品无码蜜桃,色偷偷888欧美精品久久久,99久久精品免费看国产一区二区三区 http://m.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://m.shnenglu.com/MiYu/archive/2010/10/22/130924.htmlMiYuMiYuFri, 22 Oct 2010 12:41:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/10/22/130924.htmlhttp://m.shnenglu.com/MiYu/comments/130924.htmlhttp://m.shnenglu.com/MiYu/archive/2010/10/22/130924.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/130924.htmlhttp://m.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://m.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://m.shnenglu.com/MiYu/archive/2010/09/10/126325.htmlMiYuMiYuFri, 10 Sep 2010 09:01:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/09/10/126325.htmlhttp://m.shnenglu.com/MiYu/comments/126325.htmlhttp://m.shnenglu.com/MiYu/archive/2010/09/10/126325.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/126325.htmlhttp://m.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://m.shnenglu.com/MiYu/archive/2010/08/08/122709.htmlMiYuMiYuSun, 08 Aug 2010 14:38:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/08/122709.htmlhttp://m.shnenglu.com/MiYu/comments/122709.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/08/122709.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/122709.htmlhttp://m.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精品成人片试看| 国产成人精品久久亚洲高清不卡 | 国产精品亚洲综合久久| 精品久久久久久国产91| 无码国内精品久久人妻麻豆按摩| 午夜久久久久久禁播电影| 2020最新久久久视精品爱| 久久婷婷五月综合色奶水99啪| 久久精品国产亚洲综合色| 久久久久亚洲AV无码专区首JN | 久久香综合精品久久伊人| 国产精品丝袜久久久久久不卡 | 久久亚洲电影| 久久精品视频网| 久久久久久久亚洲Av无码| 亚洲人成网站999久久久综合 | 日本久久久精品中文字幕| 久久久久久曰本AV免费免费| 国内精品免费久久影院| 国产∨亚洲V天堂无码久久久| 久久久黄色大片| 久久精品国产一区二区三区不卡| 国产精品99精品久久免费| 99精品久久精品一区二区| 亚洲国产成人精品女人久久久 | 久久综合一区二区无码| 欧美伊香蕉久久综合类网站| 色偷偷久久一区二区三区| 国产欧美久久久精品影院| 热RE99久久精品国产66热| 精品99久久aaa一级毛片| 九九久久99综合一区二区| 久久亚洲精品国产精品| 久久91精品国产91久| 午夜肉伦伦影院久久精品免费看国产一区二区三区 | 观看 国产综合久久久久鬼色 欧美 亚洲 一区二区 | 国产精品久久久久影院色|