锘??xml version="1.0" encoding="utf-8" standalone="yes"?>伊人久久大香线蕉av不变影院 ,亚洲美日韩Av中文字幕无码久久久妻妇 ,亚洲AV无码久久精品狠狠爱浪潮 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精品国产99久久久久久97| 久久综合狠狠综合久久| 狠狠久久综合| 久久国产精品99精品国产| 久久久久久久尹人综合网亚洲 | 久久亚洲精品中文字幕三区| 99久久精品免费看国产一区二区三区 | 久久99国产综合精品免费| 久久久久无码专区亚洲av| 久久久久久久97| 亚洲国产综合久久天堂| 99热精品久久只有精品| 99久久99这里只有免费的精品| 人人狠狠综合久久亚洲高清| 久久99精品国产自在现线小黄鸭| 亚洲人成无码久久电影网站| 91精品国产乱码久久久久久| 久久99精品国产麻豆宅宅| 狠狠综合久久综合中文88| 久久久无码精品亚洲日韩蜜臀浪潮| 久久精品国产一区二区三区不卡| 国内精品久久久久久99蜜桃| 久久精品国产亚洲AV忘忧草18 | 青青草原综合久久大伊人导航| 国产精品久久久久影院嫩草| 亚洲AV无码1区2区久久| 久久亚洲精品无码aⅴ大香| 亚洲精品tv久久久久| 久久高潮一级毛片免费| 狠狠久久综合| 人妻丰满?V无码久久不卡| 久久久久无码精品| 久久久久一级精品亚洲国产成人综合AV区| 99久久中文字幕| 久久综合九色综合97_久久久| 国产精品欧美久久久天天影视| 久久久久99精品成人片直播| 国产综合久久久久|