使用Java自己实现开根号运算,网上也有不少代码,多数都使用String或者数组.这里写一段只使用double基础数据类型实现的方法. private static double sqrt(int n, int p) { double lower = 0; while (lower * lower < n) { lower++; } --lower; int flag = 1; int d = 10; while (flag <= p + 1) { d = 10; for (int x = 1
Can you answer these queries? Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5195 Description A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapo
Rikka with Sequence Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2777 Accepted Submission(s): 503 Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situati