写js的时候,我们经常会使用一些js的数学方法,来将字符串转化成数字,经常会用到取整操作。比如将得到的字符串“09.09”转化成整数数字。常用的有4中方法:parseInt(),Math.ceil(),Math.floor(),Math.round()。1.parseInt()丢弃小数部分,保留整数...
分类:
Web程序 时间:
2014-12-03 12:23:26
阅读次数:
166
改了时区之后打cf更辛苦了啊。。。昨天没做,今天补了一下啊。
A. Vanya and Cubes
每次加的数规律性很明显就是:(i+1)*i/2。暴力枚举i就可以得到答案。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include ...
分类:
其他好文 时间:
2014-12-02 16:41:33
阅读次数:
117
/**
?*?@brief?Codeforces?Round?#280?(Div.?2)?c
?*?@file?c.cpp
?*?@author?mianma
?*?@created?2014/12/02?14:38
?*?@edited??2014/12/02?14:38
?*?@type?math
?*?@note?
?*??...
分类:
其他好文 时间:
2014-12-02 15:27:48
阅读次数:
204
round() 遵循四舍五入把原值转化为指定小数位数,如:round(1.45,0) = 1;round(1.55,0)=2floor()向下取整 如:floor(1.45)= 1,floor(1.55) = 1 ,floor(-1.45)= -2 ,floor(-1.55) = -2ceiling...
分类:
数据库 时间:
2014-12-02 14:44:03
阅读次数:
229
A解题思路:即为给出的形如 1,1+2,1+2+3,1+2+3+4,----,1+2+3+4+---+n的数列,给你一个数判断它在该数列的第几项。这个数列的前n项和公式为 s(n)=n*(n+1)*(n+2)/6;证明 s(n)=n*(n+1)*(n+2)/6因为 a(n)=n*(n+1)/2=n*...
分类:
其他好文 时间:
2014-12-02 13:31:59
阅读次数:
122
/**
?*?@brief?Codeforces?Round?#280?(Div.?2)?b
?*?@file?b.cpp
?*?@author?mianma
?*?@created?2014/12/02?11:11
?*?@edited??2014/12/02?11:11
?*?@type?math
?*?@note
?*/
#i...
分类:
其他好文 时间:
2014-12-02 12:08:14
阅读次数:
136
B:对于坐标先进行离散化,然后线性的扫一遍,常见的处理方式。
lines
Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 644 Accepted Submission(s): 298
Problem D...
分类:
其他好文 时间:
2014-12-02 10:39:54
阅读次数:
187
环境: linux系统 工具:PL/SQL DEVELOPER ? 第一步:查看表空间的名字及文件所在位置: select tablespace_name, file_id, file_name, round(bytes/(1024*1024),0) total_space from dba_data_files order by ta...
分类:
数据库 时间:
2014-12-02 09:06:32
阅读次数:
340
Codeforces Round #280 (Div. 2) A...
分类:
其他好文 时间:
2014-12-02 09:01:27
阅读次数:
195
Codeforces Round #280 (Div. 2) B...
分类:
其他好文 时间:
2014-12-02 09:01:05
阅读次数:
179