码迷,mamicode.com
首页 >  
搜索关键字:integer game    ( 20395个结果
delphi的取整函数round、trunc、ceil和floor
delphi的取整函数round、trunc、ceil和floor 首先引入math单元uses math;1.Round(四舍六入五留双)功能说明:对一个实数进行四舍五入。(按照银行家算法) 例:vari, j: Integer;begini := Round(1.5); // i等于2j :=....
分类:其他好文   时间:2014-06-18 21:59:23    阅读次数:261
poj 1716 Integer Intervals
DescriptionAn integer interval [a,b], a #include#include#include#include#include#include#include#includeusing namespace std;const int maxn=10000+10;st...
分类:其他好文   时间:2014-06-18 16:51:36    阅读次数:165
JAVA自动装箱与拆箱
1、什么是自动装箱基本数据类型的自动装箱(autoboxing)、拆箱(unboxing)是自J2SE 5.0开始提供的功能。一般我们要创建一个类的对象的时候,我们会这样:Class a = new Class(parameter);当我们创建一个Integer对象时,却可以这样:Integer i...
分类:编程语言   时间:2014-06-18 09:35:58    阅读次数:244
求和游戏——java
1006. 求和游戏Description石柱上有一排石头键盘,每个键上有一个整数。请你在键盘上选择两个键,使这两个键及其之间的键上的数字和最大。如果这个最大的和不为正,则输出“Game Over"。Input Format第1行:键的个数n。第2..n+1行:键上的数字整数ai。?100≤ai≤1...
分类:编程语言   时间:2014-06-18 00:25:48    阅读次数:281
LeetCode:Merge Sorted Array
Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space (size that is greater or equal to m + n) to hold additional ele...
分类:其他好文   时间:2014-06-17 23:05:13    阅读次数:246
[LeetCode] Reverse Integer
Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321Have you thought about this?Here are some good questions to ...
分类:其他好文   时间:2014-06-17 20:06:14    阅读次数:205
Roman to Integer
题目 Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 方法 public int romanToInt(String s) { HashMap hm = new H...
分类:其他好文   时间:2014-06-17 19:27:48    阅读次数:324
Integer to Roman
题目 Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 方法 /*语法: *(1)基本数字I,X,C中的任何一个连用构成数目,都不能超过三个; *  放在大数的左边只能用一个。  (2)基...
分类:其他好文   时间:2014-06-17 16:33:27    阅读次数:217
Palindrome Number
题目 Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to ...
分类:其他好文   时间:2014-06-17 16:12:39    阅读次数:226
php取整
有3个:floor — 舍去法取整 floor ($value )返回不大于 value 的下一个整数,将 value 的小数部分舍去取整。floor() 返回的类型仍然是 float,因为 float 值的范围通常比 integer 要大。 ceil — 进一法取整ceil ( $value )....
分类:Web程序   时间:2014-06-17 15:08:58    阅读次数:234
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!