zoukankan      html  css  js  c++  java
  • poj2506

    高精度递推,用java

    View Code
    import java.util.*;
    import java.io.*;
    import java.math.*;

    public class Main {
    static public void main (String[] args)throws FileNotFoundException
    {
    Scanner cin
    = new Scanner(new BufferedInputStream(System.in));
    //Scanner cin = new Scanner(new FileInputStream("t.txt"));
    BigInteger[] f = new BigInteger[260];
    f[
    0] = BigInteger.valueOf(1);
    f[
    1] = BigInteger.valueOf(1);
    for (int i = 2; i <= 250 ; i++)
    f[i]
    = f[i - 1].add(f[i - 2].multiply(BigInteger.valueOf(2)));
    while (cin.hasNext())
    {
    int a = cin.nextInt();
    System.out.println(f[a]);
    }
    }
    }

  • 相关阅读:
    DRF 版本和认证
    DRF 视图和路由
    DRF 序列化组件
    RESTful
    Vuex以及axios
    npm、webpack、vue-cli
    Vue 生命周期
    Vue Router
    Vue 组件
    Vue 快速入门
  • 原文地址:https://www.cnblogs.com/rainydays/p/2048727.html
Copyright © 2011-2022 走看看