题目链接
题意:求出f(k) % m
思路:f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + …… + a9 * f(x-10),所以可以得到一个矩阵
(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
(1, 0, 0, 0, 0, 0, 0, 0, 0, 0)
(0, 1, 0, ...
分类:
其他好文 时间:
2014-08-30 12:42:49
阅读次数:
226
为了快速解决高精度问题,总算是要来接触java了,算上这学期要开java的课了,好好学习吧! 拿来练手的是hdu的1002,高精度加法。 1 import java.util.*; 2 import java.math.*; 3 import java.io.*; 4 5 public cl...
分类:
编程语言 时间:
2014-08-30 01:12:08
阅读次数:
267
1.一行代码实现值交换//a, ba = [b, b = a][0];2.三行代码实现分页逻辑//curr_index 当前页面//link_count 显示多少页//page_count 总页数start = Math.max(1, curr_index - parseInt(link_count...
分类:
其他好文 时间:
2014-08-28 19:37:05
阅读次数:
170
你以为它是大数,但实际上它不是我觉得这应该是种可正常的姿势了import java.math.BigInteger;import java.util.Scanner;public class Main { static BigInteger p,l,r,div; static int n; publ...
分类:
其他好文 时间:
2014-08-28 11:11:09
阅读次数:
210
题目链接Devendra loves the XOR operation very much which is denoted by∧sign in most of the programming languages. He has a listAofNnumbers and he wants to...
分类:
其他好文 时间:
2014-08-27 21:53:08
阅读次数:
316
Description
The math department has been having problems lately. Due to immense amount of unsolicited automated programs which were crawling across their pages, they decided to put Yet-Another-Publ...
分类:
其他好文 时间:
2014-08-27 16:37:08
阅读次数:
220
Java的常用对象①Java的常用对象有很多,这里只对lang包中常用的Object,Date(Calendar,DateFormat,Math),System,Runtime进行介绍。㈠Object是类层次结构的根类。每个类都使用Object作为超类。所有对象(包括数组)都实现这个类的方法。在Ob...
分类:
编程语言 时间:
2014-08-27 16:31:28
阅读次数:
156
例如有动态库:math.h; math.dll; math.lib1.系统路径中包含math.dll路径。2.VC工程中,“项目”>”属性“>”C/C++“>”常规“>”附加包含目录“,加入math.h所在路径。3.VC工程中,“项目”>”属性“>”连接器“>”常规“>”附加库目录“,加入math....
分类:
其他好文 时间:
2014-08-27 16:12:07
阅读次数:
155
还是去年的时候有同事随口问我在javascript中怎么把小数转换成整数(去掉小数位),当时我回答直接用parseInt。其实那时候也没有仔细考虑这个问题还有没有其他的方法。不过最近在看别人一篇博文里的代码时,发现他这么写代码var random = (Math.random() * 2) | 0;...
分类:
编程语言 时间:
2014-08-26 22:40:26
阅读次数:
243
名称说明Abs(Decimal)返回Decimal数字的绝对值。Abs(Double)返回双精度浮点数字的绝对值。Abs(Int16)返回 16 位有符号整数的绝对值。Abs(Int32)返回 32 位有符号整数的绝对值。Abs(Int64)返回 64 位有符号整数的绝对值。Abs(SByte)返回...
分类:
其他好文 时间:
2014-08-26 21:25:36
阅读次数:
878