Farming Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1375 Accepted Submission(s): 402 Problem Description You have a big farm, and you want to grow vegetables in it. You're too lazy to se
Description Your new company is building a robot that can hold small lightweight objects. The robot will have the intelligence to determine if an object is light enough to hold. It does this by taking pictures of the object from the 6 cardinal dire
Get The Treasury Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2190 Accepted Submission(s): 669 Problem Description Jack knows that there is a great underground treasury in a secret region
题目:http://acm.hdu.edu.cn/showproblem.php?pid=2002 注意,要用double 才能过,float过不了. 体积公式要加括号(优先级别)(4 * Π * r * r * r)/3 #include <stdio.h> #define PI 3.1415927 int main() { double r, v; while(~scanf("%lf", &r)) { v = (4 * PI * r * r * r)/3; pr
package hello; public class digui { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println(1+sum(2)); } public static int sum(int x) { if (x>100) { return 0; } return x+sum(x+2); } }