码迷,mamicode.com
首页 >  
搜索关键字:math    ( 11719个结果
JavaScript--Math对象
Math对象,提供对数据的数学计算。使用 Math 的属性和方法,代码如下:运行结果:3.14159265358979315注意:Math 对象是一个固有的对象,无需创建它,直接把 Math 作为对象使用就可以调用其所有属性和方法。这是它与Date,String对象的区别。Math 对象属性Math...
分类:编程语言   时间:2015-07-24 12:07:04    阅读次数:250
POJ 1686 Lazy Math Instructor 栈的应用
Description A math instructor is too lazy to grade a question in the exam papers in which students are supposed to produce a complicated formula for t...
分类:其他好文   时间:2015-07-23 21:40:02    阅读次数:435
Python 爬虫解码问题解决
import urllib response = urllib.request.urlopen('http://math.sysu.edu.cn/main/default/index.aspx') html = response.read() html = html.decode('utf-8') print(html)上述代码会出现如下错误:UnicodeDecodeError: 'utf-8'...
分类:编程语言   时间:2015-07-23 17:56:35    阅读次数:206
[linux]cpu加压工具
/*看系统用几个核就跑几个可以实现一个逻辑核CPU 100%*/ #include "stdio.h" #include "math.h" int main (int argc,char *argv[]) {         float f=0;         printf("hello! CPU stress start for one core!\n"); ...
分类:系统相关   时间:2015-07-23 17:47:41    阅读次数:246
Java大数练习第二弹
hdu1250 水题 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1250 import java.util.*; import java.math.BigInteger; public class Main{ public static void main(String[] args){ int a; ...
分类:编程语言   时间:2015-07-23 12:17:00    阅读次数:133
js取整数四舍五入
js取整数四舍五入 1.丢弃小数部分,保留整数部分 parseInt(5/2) 2.向上取整,有小数就整数部分加1 ?Math.ceil(5/2) 3,四舍五入. Math.round(5/2) 4,向下取整 ?Math.floor(5/2) Math 对象的方法 FF: Firefox, N: ...
分类:Web程序   时间:2015-07-23 09:36:17    阅读次数:211
HDU 5145 NPY and girls (莫队分块离线)
题目地址:HDU 5145 莫队真的好神奇。。这样的复杂度居然只有n*sqrt(n)。。。 裸的莫队分块,先离线,然后按左端点分块,按块数作为第一关键字排序,然后按r值作为第二关键字进行排序。都是从小到大,可以证明这样的复杂度只有n*sqrt(n)。然后进行块之间的转移。 代码如下:#include #include #include <math.h...
分类:其他好文   时间:2015-07-23 09:31:03    阅读次数:119
HDU 1714 math
#include#include#include#include#includeusing namespace std;int main(){ double a, b, x, y; int n; scanf("%d", &n); while (n--) { scanf("%lf%lf%lf%lf",...
分类:其他好文   时间:2015-07-22 20:14:21    阅读次数:83
POJ 1942 Paths on a Grid(简单组合数学)
Paths on a Grid Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 22836   Accepted: 5622 Description Imagine you are attending your math lesson at school. Once...
分类:其他好文   时间:2015-07-22 18:57:29    阅读次数:80
Java大数练习第一弹
今天要多刷java大数,争取以后轻松水掉大数题~ hdu 1002 大数相加 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1002 【代码】 import java.util.*; import java.math.BigInteger; public class Main{ public static void main...
分类:编程语言   时间:2015-07-22 13:13:52    阅读次数:149
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!