1.数据类型:整型 实型(浮点型) 字符型 int 4(字节)short 2 (字节) long 4字节(在32位的操作系统中)8字节(在64位的操作系统中) float 4(字节)double 8(字节)char 1(字节)2.变量三部分组成:类型修饰符 变量名 =初值 int age ...
分类:
编程语言 时间:
2014-07-16 23:22:30
阅读次数:
326
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or...
分类:
其他好文 时间:
2014-07-16 23:16:32
阅读次数:
156
1 包装类Java为8个基本数据类型boolean、byte、char、int、short、long、float、double,提供了8个包装类Boolean、Byte、Character、Integer、Short、Long、Float、Double。并提供了自动装箱和自动拆箱,允许把基本类型值直...
分类:
其他好文 时间:
2014-07-16 23:09:59
阅读次数:
174
1、如何将字符串String转化为整数int int i = Integer.parseInt(str); int i = Integer.valueOf(my_str).intValue(); 注: 字串转成Double, Float, Long的方法大同小异。2、如何将字符串String转化为I...
分类:
编程语言 时间:
2014-07-16 23:09:05
阅读次数:
231
题意:给你两个字符串,求最长公共字串的长度。
by:罗穗骞模板
#include
#include
#include
#include
using namespace std;
#define M 303
#define inf 0x3fffffff
#define maxn 500000
#define ws ww
#define rank RANK
#define F(x)...
分类:
其他好文 时间:
2014-06-28 08:00:24
阅读次数:
190
This question is not so difficult.
First,my thoughts were we should use a lot of code to find out the loop block,but there is no need to do that .
you just need to get every new position of char in ...
分类:
其他好文 时间:
2014-06-27 23:39:44
阅读次数:
293
原文:C# 获取磁盘容量/// 获取指定驱动器的空间总大小(单位为B) /// /// 只需输入代表驱动器的字母即可 /// public static long GetHardDiskSpace(string str_HardDiskName) { long totalSize= ne...
分类:
其他好文 时间:
2014-06-27 22:57:05
阅读次数:
307
基本数据类型 所占用空间大小byte b; 1字节short s; 2字节int i; 4字节long l; 8字节char c; 2字节(C语言中是1字节)float f; 4字节double d; 8字节boolean bool; false/true 1字节基本数据类型注意事项:1、未带有字符...
分类:
编程语言 时间:
2014-06-27 22:49:11
阅读次数:
383
Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord...
分类:
其他好文 时间:
2014-06-27 22:25:10
阅读次数:
443
C语言%lx与%x输出结果不同%lx:unsingedlongint(长整形)十六进制表示long%x:unsingedint(整形)十六进制表示对于不同的编译系统,输出的长整型,及整形的所占字节是不同的,这导致你看到的所占位数也不同,但一般情况下整形是占两个字节的,而长整型是占四个字节的。%ld是p..
分类:
编程语言 时间:
2014-06-27 06:04:19
阅读次数:
216