昂贵的聘礼Time Limit: 1000msMemory Limit: 10000KBThis problem will be judged onPKU. Original ID:106264-bit integer IO format:%lld Java class name:Main年轻的探险...
分类:
其他好文 时间:
2014-10-25 14:25:07
阅读次数:
229
Gems Fight!Time Limit: 10000msMemory Limit: 327680KBThis problem will be judged onHDU. Original ID:477864-bit integer IO format:%I64d Java class name:...
分类:
其他好文 时间:
2014-10-25 10:27:58
阅读次数:
193
Determine whether an integer is a palindrome. Do this without extra space.
click to show spoilers.
Some hints:
Could negative integers be palindromes? (ie, -1)
If you are thinking of converting th...
分类:
其他好文 时间:
2014-10-25 09:21:10
阅读次数:
182
1, string.trim()将string中的空格去掉。2,java 中有定义int的最大值和最小值,Integer.MAX_VALUE Integer.MIN_VALUE3,将char的值转换为integer的值, 就-‘0’public class stringtoint { publ...
分类:
其他好文 时间:
2014-10-25 08:07:18
阅读次数:
184
String to Integer (atoi)
Total Accepted:
20984 Total Submissions:
145855
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a...
分类:
其他好文 时间:
2014-10-24 22:19:11
阅读次数:
199
题目描述:
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
思路:先判断给的数是正数还是负数还是零。如果是零,则直接返回。如果是正数,则通过%和/运算求得给定数字的各位,再重新组合得到要求得数字。如果为负数则先转换为正数,再按正数处理,最后返回...
分类:
其他好文 时间:
2014-10-24 16:42:21
阅读次数:
112
Spiral Matrix IIGiven an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example,Given n = 3,You should retu...
分类:
其他好文 时间:
2014-10-24 12:35:31
阅读次数:
259
11_黑马程序员_张孝祥_Java基础加强_基本数据的自动拆装箱及享元设计模式public static void main(String args[]) {Integer i11 = 1;System.out.println(i11 + 2);Integer i12 = 1;System.out....
分类:
其他好文 时间:
2014-10-24 00:02:20
阅读次数:
340
AtlantisTime Limit: 1000msMemory Limit: 32768KBThis problem will be judged onHDU. Original ID:154264-bit integer IO format:%I64d Java class name:MainT...
分类:
其他好文 时间:
2014-10-23 20:39:00
阅读次数:
287
Description Golden ratio base (GRB) is a non-integer positional numeral system that uses the golden ratio (the irrational number (1+√5)/2 ≈ 1.61803399...
分类:
其他好文 时间:
2014-10-23 20:28:51
阅读次数:
350