代码如下: 运行结果: 运算的时候带m单位和不带结果大相径庭。切记、切记 ...
分类:
其他好文 时间:
2017-09-16 13:29:57
阅读次数:
116
Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You m ...
分类:
其他好文 时间:
2017-09-10 21:51:46
阅读次数:
199
A bit is a binary digit, taking a logical value of either 1 or 0 (also referred to as "true" or "false" respectively). And every decimal number has a ...
分类:
其他好文 时间:
2017-09-10 16:38:16
阅读次数:
147
fool me once, shame on you ; fool me twice,shame on me; 1、(int)变量名[强制类型转换] 该转换方式多用于数字类型的转换从int转到long、duoble、float、decimal的转换可以使用隐 式转换,而从long转换到int就需要使 ...
-数据类型
原则
尽量使用取值范围小的,节省存储空间
整数:int,bit
小数:decimal表示浮点数
decimal(5,2)共5位数,小数占2位
字符串:varchar(可变长度的字符串),char(固定长度的字符串)
日期时间:date,time,datetime
枚举类型(enum)
附:字符串text表示存储大文本,字..
分类:
数据库 时间:
2017-09-06 22:51:06
阅读次数:
200
-数据类型
原则
尽量使用取值范围小的,节省存储空间
整数:int,bit
小数:decimal表示浮点数
decimal(5,2)共5位数,小数占2位
字符串:varchar(可变长度的字符串),char(固定长度的字符串)
日期时间:date,time,datetime
枚举类型(enum)
附:字符串text表示存储大文本,字..
分类:
数据库 时间:
2017-09-06 22:50:57
阅读次数:
192
在我们写代码的实际业务中,有时候实体类用的是String,数据库中自然是VARCHAR类型,但是如果这个实体的属性值放的是数字类型,你查询的时候又需要对它进行排序。sql怎么写呢。 别担心MySQL提供了转换方法:CAST ,CONVERT 例如:我把VARCHAR类型的价格 转换成DECIMAL ...
分类:
数据库 时间:
2017-09-05 11:18:01
阅读次数:
251
题目链接: http://poj.org/problem?id=1426 Description Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal repre ...
分类:
其他好文 时间:
2017-08-21 21:06:49
阅读次数:
240
CodeForces E. Lucky Array 幸运数列 Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contai ...
分类:
其他好文 时间:
2017-08-19 18:31:03
阅读次数:
209
C#值类型和引用类型区别 值类型包括byte,short,int,long,float,double,decimal,char,bool 和 struct ,枚举,可空类型。值类型变量声明后,不管是否已经赋值,编译器为其分配内存; 引用类型包括string 和 class,数组,接口,委托,obje ...