HDOJ 2002

#include "stdio.h"
#define PI 3.1415927

int main(void){
	double r;
	double v;

	while(scanf("%lf", &r) != EOF){
		if(r < 0.000){
			break;
		}

		v = (double)4/3 * PI * r * r * r;
		printf("%.3lf\n", v);

		v = 0.000;
	} 

	return 0;
}
时间: 2024-10-28 12:23:00

HDOJ 2002的相关文章

HDOJ 2002 计算球体积

计算球体积 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 79809    Accepted Submission(s): 32794 Problem Description 根据输入的半径值,计算球的体积. Input 输入数据有多组,每组占一行,每行包括一个实数,表示球的半径. Output 输出对应的球的体积,对于每组输入数据,

HDOJ 1150 Machine Schedule

最小点覆盖=最大匹配 Machine Schedule Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5350    Accepted Submission(s): 2650 Problem Description As we all know, machine scheduling is a very classical probl

HDOJ 1151 Air Raid

最小点覆盖 Air Raid Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3002    Accepted Submission(s): 1951 Problem Description Consider a town where all the streets are one-way and each street leads f

HDOJ 题目3518 Boring counting(后缀数组,求不重叠重复次数最少为2的子串种类数)

Boring counting Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2253    Accepted Submission(s): 924 Problem Description 035 now faced a tough problem,his english teacher gives him a string,whic

HDOJ 1507 Uncle Tom&amp;#39;s Inherited Land*

直接对每一个格子进行dfs结果除以2能够得到答案可是有大量反复的结果,不好输出答案. 能够仅仅对横纵坐标相加是奇数的格子dfs.... Uncle Tom's Inherited Land* Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1728    Accepted Submission(s): 723 Special Judge

HDOJ 1507 Uncle Tom&#39;s Inherited Land*

直接对每个格子进行dfs结果除以2可以得到答案但是有大量重复的结果,不好输出答案. 可以只对横纵坐标相加是奇数的格子dfs.... Uncle Tom's Inherited Land* Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1728    Accepted Submission(s): 723 Special Judge P

【HDOJ】4328 Cut the cake

将原问题转化为求完全由1组成的最大子矩阵.挺经典的通过dp将n^3转化为n^2. 1 /* 4328 */ 2 #include <iostream> 3 #include <sstream> 4 #include <string> 5 #include <map> 6 #include <queue> 7 #include <set> 8 #include <stack> 9 #include <vector>

#2002 无法登录 MySQL 服务器

phpMyAdmin竟然无法登录了,输入用户名和密码后点击“执行”后一直报 “#2002 无法登录 MySQL 服务器”. 后来终于找到了一个解决办法,将 “phpMyAdmin/libraries”文件夹下的config.default.php文件中的 $cfg['Servers'][$i]['host'] = 'localhost'; 修改为 $cfg['Servers'][$i]['host'] = '127.0.0.1'; 就解决了. 一个MySQL客户可以两种不同的方式连接mysqld

POJ Xiangqi 4001 &amp;&amp; HDOJ 4121 Xiangqi

题目链接(POJ):http://poj.org/problem?id=4001 题目链接(HDOJ):http://acm.hdu.edu.cn/showproblem.php?pid=4121 Xiangqi Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 1108   Accepted: 299 Description Xiangqi is one of the most popular two-player boa