码迷,mamicode.com
首页 >  
搜索关键字:math    ( 11719个结果
hdu1316 How Many Fibs?
//思路就是大整数数组保存fib数,然后二分查找import java.util.*;import java.math.*;import java.io.*;class Main { public static void main(String[] args) { // TODO...
分类:其他好文   时间:2014-09-02 21:18:15    阅读次数:184
Hackerrank--Mixing proteins(Math)
题目链接Some scientists are working on protein recombination, and during their research, they have found a remarkable fact: there are 4 proteins in the pr...
分类:其他好文   时间:2014-09-02 19:49:05    阅读次数:254
不使用Math.random实现随机数。
var rand = (function(){ var today = new Date(); var seed = today.getTime(); function rnd(){ seed = ( seed * 9301 + 49297 ) % 233280; return ...
分类:其他好文   时间:2014-09-02 17:29:24    阅读次数:145
【python】入门学习(四)
函数:定义函数#area.pyfrom math import pidef area(radius): """Return the area of a circle with the given radius.""" return pi * radius ** 2>>> ========...
分类:编程语言   时间:2014-09-02 15:43:14    阅读次数:220
Java高精度学习第二弹——求N!
继续学习Java高精度,今天写的是求N!。 首先附上源代码: import java.util.Scanner;import java.math.BigInteger;public class Main { public static void main(String []args) ...
分类:编程语言   时间:2014-09-01 21:04:23    阅读次数:225
【python】入门学习(一)
主要记录一下与C语言不同的地方和特别需要注意的地方:// 整除** 乘方整数没有长度限制,浮点数有长度限制复数:>>> 1j*1j(-1+0j)导入模块:import①import math #导入math中所有函数 使用时要用 math.sqrt()的形式②from math import *.....
分类:编程语言   时间:2014-09-01 17:36:13    阅读次数:199
Javascript 随机数
function changeImage() { document.getElementById("imgRandom").src = document.getElementById("imgRandom").src + "?random=" + Math.floor(Math.random() ....
分类:编程语言   时间:2014-09-01 10:33:22    阅读次数:164
Lua1.0 代码分析 库
Lua1.0 代码分析 库 库的代码相对比较简单。这里以数学库为例进行说明。 比如看下这个取绝对值的数学函数 static?void?math_abs?(void) { ?double?d; ?lua_Object?o?=?lua_getparam?(1); ?if?(o?==?...
分类:其他好文   时间:2014-09-01 01:42:22    阅读次数:156
Codeforces #264 (Div. 2) D. Gargari and Permutations
Gargari got bored to play with the bishops and now, after solving the problem about them, he is trying to do math homework. In a math book he have found k permutations. Each of them consists of numbe...
分类:其他好文   时间:2014-09-01 00:28:22    阅读次数:328
【转载】Javascript产生随机数的几个用法!
1. Math.random(); 结果为0-1间的一个随机数(包括0,不包括1)。 2. Math.floor(num); 参数num为一个数值,函数结果为num的整数部分。 3. Math.round(num); 参数num为一个数值,函数结果为num四舍五入后的整数。 Ma...
分类:编程语言   时间:2014-08-30 20:31:50    阅读次数:284
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!