java题目练习
zyy_315
这个作者很懒,什么都没留下…
展开
-
求高精度幂
求高精度幂原创 2017-11-18 14:36:54 · 259 阅读 · 0 评论 -
Max Sum
Problem Description Given a sequence a[1],a[2],a[3]……a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 + 4 =原创 2018-04-08 17:12:04 · 440 阅读 · 0 评论 -
java中用==比较两个字符串问题
今天犯了一个错误,再次总结一下。 输入两个字符串,我想比较连个字符串的内容是否一样,于是用了==,结果是错误的。查询资料:字符串是一个比较特殊的对象。 字符串之所以特殊,是因为java会在内容中为String类型的对像开辟一个空间,我们叫他串池! 字符串对象的创建之后会被放入到串池中。 串池有一个特点,就是对于相同对象,池中只存储一份。 那么串池把神马样的String看做是相同的Strin原创 2018-04-08 21:25:43 · 374 阅读 · 0 评论 -
Tick and Tick
Problem Description The three hands of the clock are rotating every second and meeting each other many times everyday. Finally, they get bored of this and each of them would like to stay away from the原创 2018-04-10 00:27:15 · 565 阅读 · 0 评论 -
两个大数相加问题
问题: 输入: 行数n,接下来n行每行两个数 输出: n行,每行为两个数的和 Notice that the integers are very large, that means you should not process them by using 32-bit integer.先贴出我的解决代码(经过运行为正确) import java.math.BigInteger; imp原创 2018-04-02 19:53:17 · 1038 阅读 · 1 评论 -
Quoit Design
Problem Description Have you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled awarded. In the field of Cyberground, the pos原创 2018-04-10 20:31:13 · 441 阅读 · 0 评论