几天前去面试,这道简单的题目居然做错了,看来基础就是慢慢积累的.并不断使用和复习才会成为高手,假设基础不是那么熟练.恐怕在成为高手的路上会困难重重.所以在做项目的间歇时间.偶尔回顾一下最基础的知识.是一个比較好的投资. 好了.以下介绍的就是Math类中三个与取整有关的方法 : 1.Math.round();//四舍五入 2.Math.ceil();//向上取整 3.Math.floor();//向下取整 代码展示: public class TextOne { public static voi…
HDOJ5054 Alice and Bob Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 302 Accepted Submission(s): 229 Problem Description Bob and Alice got separated in the Square, they agreed that if they…
题目链接: huangjing hdu5054 Alice and Bob 思路: 就是(x,y)在两个參考系中的表示演全然一样.那么仅仅可能在这个矩形的中点.. 题目: Alice and Bob Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 216 Accepted Submission(s): 166 Problem De…
B. Jumping Jack 题目连接: http://www.codeforces.com/contest/11/problem/B Description Jack is working on his jumping skills recently. Currently he's located at point zero of the number line. He would like to get to the point x. In order to train, he has d…