一、基础知识1、主函数:主函数是程序运行的入口。2、数据类型:值类型:整形(有符号、无符号)浮点型(float、double、decimal)字符型(char、datetime)结构体(范例:存储学生的信息,发现类比结构体功能更强大,这就是面向对象的思想)引用类型:string(函数:trim,le...
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a pr...
分类:
其他好文 时间:
2015-02-28 21:46:29
阅读次数:
187
Balanced numbers have been used by mathematicians for centuries. A positive integer is considered a balanced number if:1) Every even digit appears an odd number of times in its decimal representat...
分类:
其他好文 时间:
2015-02-28 21:40:21
阅读次数:
112
DECIMAL(M, D)
例 如:salary DECIMAL(5,2)
在这个例子中,5 (精度(precision)) 代表重要的十进制数字的数目,2 (数据范围(scale)) 代表在小数点后的数字位数。在这种情况下,因此,salary 列可以存储的值范围是从 -999.99 到 999.99。(即M代表总位数,D代表小数点后的位数);
当插入的值超过存储值的范围会报错:...
分类:
数据库 时间:
2015-02-27 15:15:56
阅读次数:
187
Problem Description
For a decimal number x with n digits (AnAn-1An-2 … A2A1), we define its weight as F(x) = An * 2n-1 + An-1 * 2n-2 + … + A2 * 2 + A1 * 1. Now you are given two numbers A and B, pleas...
分类:
其他好文 时间:
2015-02-26 14:57:25
阅读次数:
102
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a pr...
分类:
其他好文 时间:
2015-02-25 21:10:58
阅读次数:
151
在C#和Java中都有存在decimal类似的十进制数字,C++中尚未发现,春节假期忙里抽闲写了一个玩玩,时间紧迫没有测试,只能保证编译通过。抛砖引玉,欢迎大家多提建议当前缺陷:1. 除法功能没有实现2. 没有测试3. 代码比较乱没有重构,部分命名不规范4. 算法效率比较低老规矩直接上代码:VS 2...
分类:
编程语言 时间:
2015-02-23 11:57:03
阅读次数:
283
Problem Description
A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string “13” and can be divided by 13. For example, 130 and 2613 are wqb-numbers,...
分类:
其他好文 时间:
2015-02-22 15:49:05
阅读次数:
166
【题意】:输入一个符号(加减乘除) 后边跟上两个操作数。输出结果,如果不是整数,保留两位小数。注意:The result should be rounded to 2 decimal places
If and only if it is not an integer.需要判断是不是整数,不是全部保留两位小数。
可以对整个字符串分割,或者采用一个char加两个int的输入。
【AC代码】:
...
分类:
其他好文 时间:
2015-02-22 12:17:16
阅读次数:
169
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a re...
分类:
其他好文 时间:
2015-02-21 09:42:17
阅读次数:
195