函数名: fabs
功 能: 返回浮点数的绝对值
用 法: double fabs(double x);
程序例:
#include
#include
int main(void)
{
float number = -1234.0;
printf("number: %f absolute value: %f\n",
number, fabs(n...
分类:
编程语言 时间:
2014-10-18 14:04:43
阅读次数:
278
函数名:fabs功能:返回浮点数的绝对值用法:doublefabs(doublex);程序例:#include#includeintmain(void){floatnumber=-1234.0;printf("number:%fabsolutevalue:%f\n",number,fabs(numb...
分类:
其他好文 时间:
2014-10-18 13:56:31
阅读次数:
201
Problem DescriptionRecently, Mr. Xie learn the concept of happy number. A happy number is a number contain all digit 7 or only 1 digit other than 7. F...
分类:
移动开发 时间:
2014-10-18 11:02:46
阅读次数:
526
Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.Solution:N-Queens 问题的简化版。pu...
分类:
其他好文 时间:
2014-10-18 07:32:25
阅读次数:
159
文章出处:http://www.cnblogs.com/winstic/,请保留此连接python是动态类型语言,不需要预先声明变量的类型,变量类型和值在赋值的那一刻被初始化python使用对象模型来存储数据,构造任何类型的值都是一个对象数字(Number)有符号整型长整型布尔值浮点数负数decim...
分类:
编程语言 时间:
2014-10-18 00:44:05
阅读次数:
258
题目链接:点击打开链接
题意:
给定a,b
对于一个数x,若x是nice number,则满足(x/b)/(x%b) == [1,a](即结果在1-a之间)
问:
输出一个数表示 所有nice number的和。
推一推公式就好。。
结果就是
b*(b-1)/2 * (a + b*( (1+a)*a/2 ) )
#include
#include
#include
#inc...
分类:
其他好文 时间:
2014-10-17 22:03:13
阅读次数:
348
http://www.aspsnippets.com/Articles/Regular-Expression-Regex-to-allow-both-decimals-as-well-as-integers-and-Regex-for-allowing-any-decimal-number.aspx
分类:
编程语言 时间:
2014-10-17 18:09:47
阅读次数:
171
最近精力比较有限,有些常用的东西就先记录下来。方便以后自己查阅和总结。
一个哥们想要实现如下效果:
DEPTNO ENAME SAL TOP3 部门工资 排序
---------- ---------- ---------- ----------
20 KING 5...
分类:
数据库 时间:
2014-10-17 15:40:06
阅读次数:
181
Description
Lost and AekdyCoin are friends. They always play "number game"(A boring game based on number theory) together. We all know that AekdyCoin is the man called "nuclear weapon of FZU,descen...
分类:
其他好文 时间:
2014-10-17 15:38:24
阅读次数:
282
LCM Cardinality
Input: Standard Input
Output: Standard Output
Time Limit: 2 Seconds
A pair of numbers has a unique LCM but a single number can be the LCM of more than one possible pairs. For ex...
分类:
其他好文 时间:
2014-10-17 15:37:49
阅读次数:
260