InvestmentTime Limit: 1000msMemory Limit: 30000KBThis problem will be judged onPKU. Original ID:206364-bit integer IO format:%lld Java class name:Main...
分类:
其他好文 时间:
2015-04-20 20:44:34
阅读次数:
150
1、基本数据类型的包装类:byte--Byte ,shrot--Short,int--Integer,long--Long,char--character,float--Float,double--Double,boolean--Boolean a、基本类型转换为对象 b、对象转换为基本类型 c.....
分类:
其他好文 时间:
2015-04-20 20:42:24
阅读次数:
173
一:Leetcode 89 Gray Code
题目:The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in ...
分类:
其他好文 时间:
2015-04-20 17:10:42
阅读次数:
148
题目:Determine whether an integer is a palindrome. Do this without extra space.
翻译:判断一个数字是否是回文数,不要额外空间。
解题思路:因为数字既然传过去了,就不会有越界的问题。每次只需要取最前面和最后面的那一位数字进行比较,相同则继续,不同则返回、
首先要获取数字的位数,假设数字是12344321,一共有8位。
...
分类:
其他好文 时间:
2015-04-20 17:09:41
阅读次数:
132
Integer to RomanTotal Accepted:29597Total Submissions:85243My SubmissionsQuestionSolutionGiven an integer, convert it to a roman numeral.Input is guar...
分类:
其他好文 时间:
2015-04-20 16:52:02
阅读次数:
148
Problem DescriptionYour task is to Calculate a + b.InputInput contains an integer N in the first line, and then N lines follow. Each line consists of ...
分类:
其他好文 时间:
2015-04-20 16:42:30
阅读次数:
101
Roman to IntegerTotal Accepted:35099Total Submissions:100583My SubmissionsQuestionSolutionGiven a roman numeral, convert it to an integer.Input is gua...
分类:
其他好文 时间:
2015-04-20 16:32:46
阅读次数:
155
题目:
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible i...
分类:
其他好文 时间:
2015-04-20 15:04:26
阅读次数:
114
Description
Here is a circle sequence S of length n, and you can choose a position and remove the number on it.
After that,you will get a integer. More formally,you choose a number x( 1<=x<=n ),then...
分类:
编程语言 时间:
2015-04-20 15:01:12
阅读次数:
209
程序不总是顺序执行的,所以需要条件控制语句来支持分支处理,循环来处理反复多次调用。下面将减少python中的条件判断和循环语法。
条件判断
条件判断就是当某个条件为真时执行某个程序片段,否则执行另一个。
>>> x = int(input("Please enter an integer: "))
Please enter an integer: 2
>>> if x < 0:
x = ...
分类:
编程语言 时间:
2015-04-20 14:54:00
阅读次数:
130