摘要: 可以推出公式f[n]=f[n-1]+f[n-1]*2*(n-1)f[1]=1;数据量很大,最后又要进行gcd操作,java里竟然自带了一个gcd的函数,为了避免求大数取余和大数除法操作,还是用java比较快,而且这题对时间复杂度要求不是很高。/* * To change this template, choose Tools | Templates * and open the template in the editor. */import java.math.BigInteger;import java.util.Scanner;/** * * @author chen */public 阅读全文
posted @ 2013-07-19 15:17 chenhuan001 阅读(288) 评论(0) 推荐(0) 编辑